summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorForest Bond <forest.bond@rapidrollout.com>2013-03-29 16:23:55 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-03 08:11:17 (GMT)
commitcc451da07895b1b2bc4c20c901344ce2ce3e3f08 (patch)
tree24465a968cfba9d6c1261dcfde319685a64410f5 /plugins
parent4c09e05f07a7777929e05552e659cae09cf5a4cb (diff)
downloadconnman-cc451da07895b1b2bc4c20c901344ce2ce3e3f08.zip
connman-cc451da07895b1b2bc4c20c901344ce2ce3e3f08.tar.gz
connman-cc451da07895b1b2bc4c20c901344ce2ce3e3f08.tar.bz2
ofono: Add the CDMA network when the device is created
There is a race that causes the network not to be added if we get the CDMA netreg changed signal before the CDMA connection manager added signal. In that case the network is not added because the device has not been created yet. So we fix this by trying to add the network whenever the device is created.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ofono.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/ofono.c b/plugins/ofono.c
index 09718a4..847f256 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -2034,8 +2034,11 @@ 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)
+ if (ready_to_create_device(modem) == TRUE) {
create_device(modem);
+ if (modem->registered == TRUE)
+ add_cdma_network(modem);
+ }
if (modem->device != NULL)
cdma_cm_get_properties(modem);
@@ -2131,8 +2134,11 @@ static gboolean modem_changed(DBusConnection *conn, DBusMessage *message,
if (has_interface(modem->interfaces,
OFONO_API_CDMA_CM) == TRUE) {
- if (ready_to_create_device(modem) == TRUE)
+ if (ready_to_create_device(modem) == TRUE) {
create_device(modem);
+ if (modem->registered == TRUE)
+ add_cdma_network(modem);
+ }
}
}