ofono: Do not call set_connected() from the activation reply
authorYu A Wang <arron.wang@intel.com>
Thu, 24 Nov 2011 11:52:44 +0000 (06:52 -0500)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 29 Nov 2011 12:23:05 +0000 (13:23 +0100)
As the IP setting may not be set when getting the activation D-Bus reply,
set_connected should not be called at that point but rather from
the context_changed routine.

Fixes BMC#24284

plugins/ofono.c

index bcb79ae..625e25b 100644 (file)
@@ -528,13 +528,11 @@ static void set_active_reply(DBusPendingCall *call, void *user_data)
                connman_error("SetProperty(Active) %s %s",
                                error.name, error.message);
 
-               if (connman_network_get_index(info->network) < 0)
-                       connman_network_set_error(info->network,
+               connman_network_set_error(info->network,
                                CONNMAN_NETWORK_ERROR_ASSOCIATE_FAIL);
 
                dbus_error_free(&error);
-       } else if (connman_network_get_index(info->network) >= 0)
-               set_connected(info, TRUE);
+       }
 
 done:
        dbus_message_unref(reply);