diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-10-02 03:36:21 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-10-02 03:36:21 +0200 |
commit | 8c33ecc789f942486b8276eefbf6d05a365ccfcc (patch) | |
tree | 5ab6dc03964b2b4eed188ee6af439a9b5d436b9f /plugins | |
parent | 074bb30fc9d58c2b9a2f4efa87cb81b37c061b33 (diff) | |
download | connman-8c33ecc789f942486b8276eefbf6d05a365ccfcc.tar.gz connman-8c33ecc789f942486b8276eefbf6d05a365ccfcc.tar.bz2 connman-8c33ecc789f942486b8276eefbf6d05a365ccfcc.zip |
Update plugins to the new g_at_tty_open API
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mbm.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/mbm.c b/plugins/mbm.c index 33616b73..a31d0973 100644 --- a/plugins/mbm.c +++ b/plugins/mbm.c @@ -44,6 +44,7 @@ #include <connman/log.h> #include <gatchat.h> +#include <gattty.h> 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; |