All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gatserver: add v250 ATL and ATM commands
@ 2011-03-24 11:02 Olivier Guiter
  2011-03-24 18:29 ` Denis Kenzior
  0 siblings, 1 reply; 3+ messages in thread
From: Olivier Guiter @ 2011-03-24 11:02 UTC (permalink / raw)
  To: ofono

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

---
 gatchat/gatserver.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/gatchat/gatserver.c b/gatchat/gatserver.c
index 8266ead..0381723 100644
--- a/gatchat/gatserver.c
+++ b/gatchat/gatserver.c
@@ -94,6 +94,8 @@ struct v250_settings {
 	int res_format;			/* set by X<val> */
 	int c109;			/* set by &C<val> */
 	int c108;			/* set by &D<val> */
+	char l;				/* set by L<val> */
+	char m;				/* set by M<val> */
 };
 
 /* AT command set that server supported */
@@ -296,6 +298,8 @@ static void v250_settings_create(struct v250_settings *v250)
 	v250->res_format = 0;
 	v250->c109 = 1;
 	v250->c108 = 0;
+	v250->l = 0;
+	v250->m = 1;
 }
 
 static void s_template_cb(GAtServerRequestType type, GAtResult *result,
@@ -360,6 +364,18 @@ static void at_s5_cb(GAtServer *server, GAtServerRequestType type,
 	s_template_cb(type, result, server, &server->v250.s5, "S5", 0, 127);
 }
 
+static void at_l_cb(GAtServer *server, GAtServerRequestType type,
+			GAtResult *result, gpointer user_data)
+{
+	s_template_cb(type, result, server, &server->v250.s5, "L", 0, 3);
+}
+
+static void at_m_cb(GAtServer *server, GAtServerRequestType type,
+			GAtResult *result, gpointer user_data)
+{
+	s_template_cb(type, result, server, &server->v250.m, "M", 0, 2);
+}
+
 static void at_template_cb(GAtServerRequestType type, GAtResult *result,
 					GAtServer *server, int *value,
 					const char *prefix,
@@ -1159,6 +1175,8 @@ static void basic_command_register(GAtServer *server)
 	g_at_server_register(server, "&D", at_c108_cb, NULL, NULL);
 	g_at_server_register(server, "Z", at_z_cb, NULL, NULL);
 	g_at_server_register(server, "&F", at_f_cb, NULL, NULL);
+	g_at_server_register(server, "L", at_l_cb, NULL, NULL);
+	g_at_server_register(server, "M", at_m_cb, NULL, NULL);
 }
 
 GAtServer *g_at_server_new(GIOChannel *io)
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gatserver: add v250 ATL and ATM commands
  2011-03-24 11:02 [PATCH] gatserver: add v250 ATL and ATM commands Olivier Guiter
@ 2011-03-24 18:29 ` Denis Kenzior
  2011-03-25  8:16   ` Olivier Guiter
  0 siblings, 1 reply; 3+ messages in thread
From: Denis Kenzior @ 2011-03-24 18:29 UTC (permalink / raw)
  To: ofono

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

Hi Olivier,

> +static void at_l_cb(GAtServer *server, GAtServerRequestType type,
> +			GAtResult *result, gpointer user_data)
> +{
> +	s_template_cb(type, result, server, &server->v250.s5, "L", 0, 3);

Copy paste error?  I presume you mean v250.l here

Regards,
-Denis

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gatserver: add v250 ATL and ATM commands
  2011-03-24 18:29 ` Denis Kenzior
@ 2011-03-25  8:16   ` Olivier Guiter
  0 siblings, 0 replies; 3+ messages in thread
From: Olivier Guiter @ 2011-03-25  8:16 UTC (permalink / raw)
  To: ofono

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

On 03/24/2011 07:29 PM, Denis Kenzior wrote:
> Hi Olivier,
>
>> +static void at_l_cb(GAtServer *server, GAtServerRequestType type,
>> +			GAtResult *result, gpointer user_data)
>> +{
>> +	s_template_cb(type, result, server,&server->v250.s5, "L", 0, 3);
> Copy paste error?  I presume you mean v250.l here
>
> Regards,
> -Denis
Ooooops... you re right... sorry
Olivier

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-25  8:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-24 11:02 [PATCH] gatserver: add v250 ATL and ATM commands Olivier Guiter
2011-03-24 18:29 ` Denis Kenzior
2011-03-25  8:16   ` Olivier Guiter

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.