diff options
author | Dan Williams <dcbw@redhat.com> | 2008-02-15 23:12:56 +0000 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2008-02-15 23:12:56 +0000 |
commit | 67763ef3cdc1912740d7580f746c702b011b2fc3 (patch) | |
tree | 4fc659aa75c9c21604a34e9ebc2e5dfc2f22a256 | |
parent | 635eefa3897c76adc24cd7993cf13da1b2b30c5e (diff) | |
download | NetworkManager-67763ef3cdc1912740d7580f746c702b011b2fc3.tar.gz |
2008-02-15 Dan Williams <dcbw@redhat.com>
* src/nm-hal-manager.c
- (modem_device_creator): recognize new HAL modem capabilities
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3321 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/nm-hal-manager.c | 22 |
2 files changed, 24 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2008-02-15 Dan Williams <dcbw@redhat.com> + + * src/nm-hal-manager.c + - (modem_device_creator): recognize new HAL modem capabilities + 2008-02-12 Dan Williams <dcbw@redhat.com> * system-settings/plugins/ifcfg-fedora/plugin.c diff --git a/src/nm-hal-manager.c b/src/nm-hal-manager.c index ecd354fd1e..c6e66ac806 100644 --- a/src/nm-hal-manager.c +++ b/src/nm-hal-manager.c @@ -211,19 +211,35 @@ modem_device_creator (NMHalManager *manager, const char *udi) if (!serial_device || !driver_name) goto out; - capabilities = libhal_device_get_property_strlist (manager->hal_ctx, udi, "info.capabilities", NULL); + capabilities = libhal_device_get_property_strlist (manager->hal_ctx, udi, "modem.command_sets", NULL); for (iter = capabilities; *iter; iter++) { - if (!strcmp (*iter, "gsm")) { + if (!strcmp (*iter, "GSM-07.07")) { type_gsm = TRUE; break; } - if (!strcmp (*iter, "cdma")) { + if (!strcmp (*iter, "IS-707-A")) { type_cdma = TRUE; break; } } g_strfreev (capabilities); + /* Compatiblity with the pre-specification bits */ + if (!type_gsm && !type_cdma) { + capabilities = libhal_device_get_property_strlist (manager->hal_ctx, udi, "info.capabilities", NULL); + for (iter = capabilities; *iter; iter++) { + if (!strcmp (*iter, "gsm")) { + type_gsm = TRUE; + break; + } + if (!strcmp (*iter, "cdma")) { + type_cdma = TRUE; + break; + } + } + g_strfreev (capabilities); + } + if (type_gsm) device = (NMDevice *) nm_gsm_device_new (udi, serial_device + strlen ("/dev/"), NULL, driver_name); else if (type_cdma) |