All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] telit: set baud rate to 115200
@ 2012-12-17 10:15 Christopher Vogl
  2012-12-17 15:32 ` Denis Kenzior
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Vogl @ 2012-12-17 10:15 UTC (permalink / raw)
  To: ofono

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

Telit HE910 needs the baud rate to be set.
---
 plugins/telit.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/plugins/telit.c b/plugins/telit.c
index fe2ccd6..64f763a 100644
--- a/plugins/telit.c
+++ b/plugins/telit.c
@@ -186,6 +186,7 @@ static GAtChat *open_device(struct ofono_modem *modem,
 	GAtSyntax *syntax;
 	GIOChannel *channel;
 	GAtChat *chat;
+	GHashTable *options;
 
 	device = ofono_modem_get_string(modem, key);
 	if (device == NULL)
@@ -193,7 +194,13 @@ static GAtChat *open_device(struct ofono_modem *modem,
 
 	DBG("%s %s", key, device);
 
-	channel = g_at_tty_open(device, NULL);
+	options = g_hash_table_new(g_str_hash, g_str_equal);
+	if (options == NULL)
+		return NULL;
+
+	g_hash_table_insert(options, "Baud", "115200");
+
+	channel = g_at_tty_open(device, options);
 	if (channel == NULL)
 		return NULL;
 
-- 
1.7.7.6


--
Scanned by MailScanner.


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

* Re: [PATCH] telit: set baud rate to 115200
  2012-12-17 10:15 [PATCH] telit: set baud rate to 115200 Christopher Vogl
@ 2012-12-17 15:32 ` Denis Kenzior
  2012-12-17 16:07   ` Christopher Vogl
  0 siblings, 1 reply; 4+ messages in thread
From: Denis Kenzior @ 2012-12-17 15:32 UTC (permalink / raw)
  To: ofono

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

Hi Christopher,

On 12/17/2012 04:15 AM, Christopher Vogl wrote:
> Telit HE910 needs the baud rate to be set.
> ---
>   plugins/telit.c |    9 ++++++++-
>   1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/plugins/telit.c b/plugins/telit.c
> index fe2ccd6..64f763a 100644
> --- a/plugins/telit.c
> +++ b/plugins/telit.c
> @@ -186,6 +186,7 @@ static GAtChat *open_device(struct ofono_modem *modem,
>   	GAtSyntax *syntax;
>   	GIOChannel *channel;
>   	GAtChat *chat;
> +	GHashTable *options;
>
>   	device = ofono_modem_get_string(modem, key);
>   	if (device == NULL)
> @@ -193,7 +194,13 @@ static GAtChat *open_device(struct ofono_modem *modem,
>
>   	DBG("%s %s", key, device);
>
> -	channel = g_at_tty_open(device, NULL);
> +	options = g_hash_table_new(g_str_hash, g_str_equal);
> +	if (options == NULL)
> +		return NULL;
> +
> +	g_hash_table_insert(options, "Baud", "115200");
> +
> +	channel = g_at_tty_open(device, options);

Are you leaking the hash table object here?

>   	if (channel == NULL)
>   		return NULL;
>

Regards,
-Denis

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

* [PATCH] telit: set baud rate to 115200
  2012-12-17 15:32 ` Denis Kenzior
@ 2012-12-17 16:07   ` Christopher Vogl
  2012-12-17 16:18     ` Denis Kenzior
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Vogl @ 2012-12-17 16:07 UTC (permalink / raw)
  To: ofono

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

Telit HE910 needs the baud rate to be set.
---
 plugins/telit.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/plugins/telit.c b/plugins/telit.c
index fe2ccd6..79bc421 100644
--- a/plugins/telit.c
+++ b/plugins/telit.c
@@ -186,6 +186,7 @@ static GAtChat *open_device(struct ofono_modem *modem,
 	GAtSyntax *syntax;
 	GIOChannel *channel;
 	GAtChat *chat;
+	GHashTable *options;
 
 	device = ofono_modem_get_string(modem, key);
 	if (device == NULL)
@@ -193,7 +194,16 @@ static GAtChat *open_device(struct ofono_modem *modem,
 
 	DBG("%s %s", key, device);
 
-	channel = g_at_tty_open(device, NULL);
+	options = g_hash_table_new(g_str_hash, g_str_equal);
+	if (options == NULL)
+		return NULL;
+
+	g_hash_table_insert(options, "Baud", "115200");
+
+	channel = g_at_tty_open(device, options);
+
+	g_hash_table_destroy(options);
+
 	if (channel == NULL)
 		return NULL;
 
-- 
1.7.7.6


--
Scanned by MailScanner.


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

* Re: [PATCH] telit: set baud rate to 115200
  2012-12-17 16:07   ` Christopher Vogl
@ 2012-12-17 16:18     ` Denis Kenzior
  0 siblings, 0 replies; 4+ messages in thread
From: Denis Kenzior @ 2012-12-17 16:18 UTC (permalink / raw)
  To: ofono

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

Hi Christopher,

On 12/17/2012 10:07 AM, Christopher Vogl wrote:
> Telit HE910 needs the baud rate to be set.
> ---
>   plugins/telit.c |   12 +++++++++++-
>   1 files changed, 11 insertions(+), 1 deletions(-)
>

Patch has been applied, thanks.

Regards,
-Denis


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

end of thread, other threads:[~2012-12-17 16:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-17 10:15 [PATCH] telit: set baud rate to 115200 Christopher Vogl
2012-12-17 15:32 ` Denis Kenzior
2012-12-17 16:07   ` Christopher Vogl
2012-12-17 16:18     ` Denis Kenzior

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.