summaryrefslogtreecommitdiffstats
path: root/plugins/mbm.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-09-02 19:37:55 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-09-02 19:37:55 -0700
commit057860c4c7731a490c451b8c7c3d68e4257159ee (patch)
treef770d4b7df8c3e411d09e1c86884c1ec0f2da578 /plugins/mbm.c
parent9c45f2e74b3defa854f2c1556231f70bdc76fb13 (diff)
downloadofono-057860c4c7731a490c451b8c7c3d68e4257159ee.tar.bz2
Parse and use Device option from modem.conf
Diffstat (limited to 'plugins/mbm.c')
-rw-r--r--plugins/mbm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mbm.c b/plugins/mbm.c
index 5fbb3a42..c11c9c40 100644
--- a/plugins/mbm.c
+++ b/plugins/mbm.c
@@ -87,11 +87,16 @@ static int mbm_enable(struct ofono_modem *modem)
{
struct mbm_data *data = ofono_modem_get_data(modem);
GAtSyntax *syntax;
+ const char *device;
DBG("%p", modem);
+ device = ofono_modem_get_string(modem, "Device");
+ if (!device)
+ return -EINVAL;
+
syntax = g_at_syntax_new_gsmv1();
- data->chat = g_at_chat_new_from_tty("/dev/ttyACM0", syntax);
+ data->chat = g_at_chat_new_from_tty(device, syntax);
g_at_syntax_unref(syntax);
if (!data->chat)