From 8c33ecc789f942486b8276eefbf6d05a365ccfcc Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 2 Oct 2009 03:36:21 +0200 Subject: [PATCH] Update plugins to the new g_at_tty_open API --- plugins/mbm.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/mbm.c b/plugins/mbm.c index 33616b7..a31d097 100644 --- a/plugins/mbm.c +++ b/plugins/mbm.c @@ -44,6 +44,7 @@ #include #include +#include static const char *cfun_prefix[] = { "+CFUN:", NULL }; static const char *cind_prefix[] = { "+CIND:", NULL }; @@ -661,6 +662,7 @@ static int mbm_enable(struct connman_device *device) { struct mbm_data *data = connman_device_get_data(device); GAtSyntax *syntax; + GIOChannel *channel; const char *devnode; int index; @@ -670,10 +672,16 @@ static int mbm_enable(struct connman_device *device) if (devnode == NULL) return -EIO; + channel = g_at_tty_open(devnode, NULL); + if (channel == NULL) + return -EIO; + syntax = g_at_syntax_new_gsmv1(); - data->chat = g_at_chat_new_from_tty(devnode, syntax); + data->chat = g_at_chat_new(channel, syntax); g_at_syntax_unref(syntax); + g_io_channel_unref(channel); + if (data->chat == NULL) return -EIO; -- 2.7.4