From: Forest Bond <[email protected]>
Previously, the CDMA device was created only after the CDMA
ConnectionManager interface was added. This created a chicken-and-egg
problem because oFono would not add the CM interface until after the
modem was online, but we would not set the modem online until enabling
the device (which was not created yet). As a result, CDMA modems would
only work if they were set online manually.
---
plugins/ofono.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/plugins/ofono.c b/plugins/ofono.c
index 41954e4..fe69495 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -2031,9 +2031,6 @@ static void modem_update_interfaces(struct modem_data
*modem,
}
if (api_added(old_ifaces, new_ifaces, OFONO_API_CDMA_CM) == TRUE) {
- if (ready_to_create_device(modem) == TRUE)
- create_device(modem);
-
if (modem->device != NULL)
cdma_cm_get_properties(modem);
}
@@ -2126,11 +2123,8 @@ static gboolean modem_changed(DBusConnection *conn,
DBusMessage *message,
DBG("%s Serial %s", modem->path, modem->serial);
- if (has_interface(modem->interfaces,
- OFONO_API_CDMA_CM) == TRUE) {
- if (ready_to_create_device(modem) == TRUE)
- create_device(modem);
- }
+ if (ready_to_create_device(modem) == TRUE)
+ create_device(modem);
}
return TRUE;
@@ -2214,6 +2208,9 @@ static void add_modem(const char *path, DBusMessageIter
*prop)
}
modem_update_interfaces(modem, 0, modem->interfaces);
+
+ if (ready_to_create_device(modem) == TRUE)
+ create_device(modem);
}
static void modem_power_down(gpointer key, gpointer value, gpointer user_data)
--
1.7.0.4
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman