summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPekka Pessi <Pekka.Pessi@nokia.com>2010-09-16 17:56:18 +0300
committerAki Niemi <aki.niemi@nokia.com>2010-09-30 11:25:47 +0300
commit43e9d09a1cb18bfa955e20b064f309fe15ff2a25 (patch)
tree9211be21cafdb9b50a1014bafca4a3ddfae5f151
parent82894cf58f8ed1ab4935bd17bac9890b15e4569d (diff)
downloadofono-43e9d09a1cb18bfa955e20b064f309fe15ff2a25.tar.bz2
modemconf: set up isigen and n900
Allows basic configuration of phonet links.
-rw-r--r--plugins/modemconf.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/plugins/modemconf.c b/plugins/modemconf.c
index d7b13546..3a823e39 100644
--- a/plugins/modemconf.c
+++ b/plugins/modemconf.c
@@ -116,14 +116,17 @@ static int set_device(struct ofono_modem *modem,
static int set_interface(struct ofono_modem *modem,
GKeyFile *keyfile, const char *group)
{
- char *iface;
+ char *value;
- iface = g_key_file_get_string(keyfile, group, "Interface", NULL);
- if (!iface)
- return -EINVAL;
+ value = g_key_file_get_string(keyfile, group, "Interface", NULL);
+ if (value)
+ ofono_modem_set_string(modem, "Interface", value);
+ g_free(value);
- ofono_modem_set_string(modem, "Interface", iface);
- g_free(iface);
+ value = g_key_file_get_string(keyfile, group, "Address", NULL);
+ if (value)
+ ofono_modem_set_integer(modem, "Address", atoi(value));
+ g_free(value);
return 0;
}
@@ -141,8 +144,8 @@ static struct {
{ "ste", set_interface },
{ "calypso", set_device },
{ "palmpre", set_device },
- { "isimodem", set_interface },
- { "n900modem", set_interface },
+ { "isigen", set_interface },
+ { "n900", set_interface },
{ NULL }
};