From: Marcel Holtmann Date: Thu, 22 Oct 2009 01:28:26 +0000 (+0900) Subject: Update and sync GAtChat from oFono X-Git-Tag: 2.0_alpha~3183 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=33bd0f2540ad0696b256d9ddcb2d4d4e82789ba0;p=framework%2Fconnectivity%2Fconnman.git Update and sync GAtChat from oFono --- diff --git a/gatchat/gatchat.c b/gatchat/gatchat.c index 66874e2..320150a 100644 --- a/gatchat/gatchat.c +++ b/gatchat/gatchat.c @@ -967,6 +967,14 @@ error: return NULL; } +GIOChannel *g_at_chat_get_channel(GAtChat *chat) +{ + if (chat == NULL) + return NULL; + + return chat->channel; +} + GAtChat *g_at_chat_ref(GAtChat *chat) { if (chat == NULL) diff --git a/gatchat/gatchat.h b/gatchat/gatchat.h index 6a4c222..fe5b97b 100644 --- a/gatchat/gatchat.h +++ b/gatchat/gatchat.h @@ -40,7 +40,8 @@ typedef void (*GAtDisconnectFunc)(gpointer user_data); typedef void (*GAtDebugFunc)(const char *str, gpointer user_data); GAtChat *g_at_chat_new(GIOChannel *channel, GAtSyntax *syntax); -GAtChat *g_at_chat_new_from_tty(const char *device, GAtSyntax *syntax); + +GIOChannel *g_at_chat_get_channel(GAtChat *chat); GAtChat *g_at_chat_ref(GAtChat *chat); void g_at_chat_unref(GAtChat *chat); diff --git a/gatchat/gattty.c b/gatchat/gattty.c index 30d9444..f18eca4 100644 --- a/gatchat/gattty.c +++ b/gatchat/gattty.c @@ -72,14 +72,22 @@ static gboolean set_baud(const char *baud, struct termios *ti) speed = B1500000; else if (g_str_equal(baud, "2000000")) speed = B2000000; +#ifdef B2500000 else if (g_str_equal(baud, "2500000")) speed = B2500000; +#endif +#ifdef B3000000 else if (g_str_equal(baud, "3000000")) speed = B3000000; +#endif +#ifdef B3500000 else if (g_str_equal(baud, "3500000")) speed = B3500000; +#endif +#ifdef B4000000 else if (g_str_equal(baud, "4000000")) speed = B4000000; +#endif else return FALSE;