diff options
Diffstat (limited to 'plugins/huawei.c')
-rw-r--r-- | plugins/huawei.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/huawei.c b/plugins/huawei.c index 392804da..17548460 100644 --- a/plugins/huawei.c +++ b/plugins/huawei.c @@ -29,6 +29,7 @@ #include <glib.h> #include <gatchat.h> +#include <gattty.h> #define OFONO_API_SUBJECT_TO_CHANGE #include <ofono/plugin.h> @@ -87,6 +88,7 @@ static int huawei_enable(struct ofono_modem *modem) { struct huawei_data *data = ofono_modem_get_data(modem); GAtSyntax *syntax; + GIOChannel *channel; const char *device; DBG("%p", modem); @@ -95,9 +97,14 @@ static int huawei_enable(struct ofono_modem *modem) if (!device) return -EINVAL; + channel = g_at_tty_open(device, NULL); + if (!channel) + return -EIO; + syntax = g_at_syntax_new_gsmv1(); - data->chat = g_at_chat_new_from_tty(device, syntax); + data->chat = g_at_chat_new(channel, syntax); g_at_syntax_unref(syntax); + g_io_channel_unref(channel); if (!data->chat) return -EIO; |