When activated context is found, do not connect to it unless requested to do so. --- plugins/ofono.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/plugins/ofono.c b/plugins/ofono.c index ed6317b..92ab9d7 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -600,7 +600,8 @@ static int add_network(struct connman_device *device, if (connman_device_add_network(device, network) != 0) goto error; - if (active) + /* Connect only if requested to do so */ + if (active && connman_network_get_connecting(network) == TRUE) set_connected(network, active); return 0; @@ -1731,7 +1732,12 @@ static gboolean context_changed(DBusConnection *connection, dbus_message_iter_get_basic(&value, &active); - set_connected(network, active); + if (active == FALSE) + set_connected(network, active); + + /* Connect only if requested to do so */ + if (active && connman_network_get_connecting(network) == TRUE) + set_connected(network, active); } return TRUE; -- 1.7.0.4 _______________________________________________ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman