summaryrefslogtreecommitdiffstats
path: root/plugins/hso.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-10-01 17:01:15 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-10-01 17:01:15 -0500
commit79cb80c7eba59a3662db7d8aaaa8f6d157df4e0a (patch)
tree4f0e1db1a7eba3fa79806fda501bf8e815c3af82 /plugins/hso.c
parent6a78e402d32d2fdc6b60e6269818f264d744e0f0 (diff)
downloadofono-79cb80c7eba59a3662db7d8aaaa8f6d157df4e0a.tar.bz2
Update plugins to the new g_at_tty_open API
Diffstat (limited to 'plugins/hso.c')
-rw-r--r--plugins/hso.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/hso.c b/plugins/hso.c
index e678aab3..b1cc6663 100644
--- a/plugins/hso.c
+++ b/plugins/hso.c
@@ -29,6 +29,7 @@
#include <glib.h>
#include <gatchat.h>
+#include <gattty.h>
#define OFONO_API_SUBJECT_TO_CHANGE
#include <ofono/plugin.h>
@@ -88,6 +89,7 @@ static int hso_enable(struct ofono_modem *modem)
{
struct hso_data *data = ofono_modem_get_data(modem);
GAtSyntax *syntax;
+ GIOChannel *channel;
const char *device;
DBG("%p", modem);
@@ -99,9 +101,14 @@ static int hso_enable(struct ofono_modem *modem)
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;