All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olivier Guiter <olivier.guiter@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH v3] gatserver: ATS6 command handler added
Date: Mon, 17 Jan 2011 12:18:58 +0100	[thread overview]
Message-ID: <1295263138-13265-1-git-send-email-olivier.guiter@linux.intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1751 bytes --]

Use integer to be compliant with existing function prototypes.
---
 gatchat/gatserver.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c
index 11eaac6..be9f79a 100644
--- a/gatchat/gatserver.c
+++ b/gatchat/gatserver.c
@@ -83,6 +83,7 @@ struct v250_settings {
 	char s3;			/* set by S3=<val> */
 	char s4;			/* set by S4=<val> */
 	char s5;			/* set by S5=<val> */
+	int s6;				/* set by S6=<val> */
 	gboolean echo;			/* set by E<val> */
 	gboolean quiet;			/* set by Q<val> */
 	gboolean is_v1;			/* set by V<val>, v0 or v1 */
@@ -412,6 +413,13 @@ static void at_x_cb(GAtServerRequestType type, GAtResult *result,
 			"X", 0, 4, 4);
 }
 
+static void at_s6_cb(GAtServerRequestType type, GAtResult *result,
+			gpointer user_data)
+{
+	GAtServer *server = user_data;
+	at_template_cb(type, result, server, &server->v250.s6, "S6", 0, 1, 1);
+}
+
 static void at_c109_cb(GAtServerRequestType type, GAtResult *result,
 			gpointer user_data)
 {
@@ -1031,6 +1039,7 @@ static void v250_settings_create(struct v250_settings *v250)
 	v250->s3 = '\r';
 	v250->s4 = '\n';
 	v250->s5 = '\b';
+	v250->s6 = 2;
 	v250->echo = TRUE;
 	v250->quiet = FALSE;
 	v250->is_v1 = TRUE;
@@ -1058,6 +1067,7 @@ static void basic_command_register(GAtServer *server)
 	g_at_server_register(server, "Q", at_q_cb, server, NULL);
 	g_at_server_register(server, "V", at_v_cb, server, NULL);
 	g_at_server_register(server, "X", at_x_cb, server, NULL);
+	g_at_server_register(server, "S6", at_s6_cb, server, NULL);
 	g_at_server_register(server, "&C", at_c109_cb, server, NULL);
 	g_at_server_register(server, "&D", at_c108_cb, server, NULL);
 }
-- 
1.7.1


             reply	other threads:[~2011-01-17 11:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-17 11:18 Olivier Guiter [this message]
2011-01-18 15:11 ` [PATCH v3] gatserver: ATS6 command handler added Marcel Holtmann

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=1295263138-13265-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.