From: Olivier Guiter <olivier.guiter@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH 1/1] gatserver: Add send raw data function
Date: Fri, 11 Feb 2011 17:03:03 +0100 [thread overview]
Message-ID: <1297440183-4384-1-git-send-email-olivier.guiter@linux.intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]
---
gatchat/gatserver.c | 14 ++++++++++++++
gatchat/gatserver.h | 1 +
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c
index 25b7ba4..f2ee34d 100644
--- a/gatchat/gatserver.c
+++ b/gatchat/gatserver.c
@@ -252,6 +252,20 @@ void g_at_server_send_info(GAtServer *server, const char *line, gboolean last)
send_common(server, buf, len);
}
+void g_at_server_send_data(GAtServer *server, const char *format, ...)
+{
+ char buf[MAX_TEXT_SIZE + 1];
+ unsigned int len;
+
+ va_list ap;
+
+ va_start(ap, format);
+ len = vsnprintf(buf, MAX_TEXT_SIZE, format, ap);
+ va_end(ap);
+
+ send_common(server, buf, len);
+}
+
static gboolean get_result_value(GAtServer *server, GAtResult *result,
const char *command,
int min, int max, int *value)
diff --git a/gatchat/gatserver.h b/gatchat/gatserver.h
index f0c19da..911f20d 100644
--- a/gatchat/gatserver.h
+++ b/gatchat/gatserver.h
@@ -112,6 +112,7 @@ void g_at_server_send_unsolicited(GAtServer *server, const char *result);
* responses.
*/
void g_at_server_send_info(GAtServer *server, const char *line, gboolean last);
+void g_at_server_send_data(GAtServer *server, const char *format, ...);
#ifdef __cplusplus
}
--
1.7.1
next reply other threads:[~2011-02-11 16:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 16:03 Olivier Guiter [this message]
2011-02-14 16:23 ` [PATCH 1/1] gatserver: Add send raw data function Denis Kenzior
2011-02-14 16:32 ` Olivier Guiter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1297440183-4384-1-git-send-email-olivier.guiter@linux.intel.com \
--to=olivier.guiter@linux.intel.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox