summaryrefslogtreecommitdiff
path: root/src/nm-hal-manager.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2008-02-15 23:12:56 +0000
committerDan Williams <dcbw@redhat.com>2008-02-15 23:12:56 +0000
commit67763ef3cdc1912740d7580f746c702b011b2fc3 (patch)
tree4fc659aa75c9c21604a34e9ebc2e5dfc2f22a256 /src/nm-hal-manager.c
parent635eefa3897c76adc24cd7993cf13da1b2b30c5e (diff)
downloadNetworkManager-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
Diffstat (limited to 'src/nm-hal-manager.c')
-rw-r--r--src/nm-hal-manager.c22
1 files changed, 19 insertions, 3 deletions
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)