diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2010-04-06 23:39:57 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-04-06 23:45:12 +0200 |
commit | 3291e6583f5bdb4fc6037cd33a357890127c3a1d (patch) | |
tree | 70297cd97534a526d535a272d76330ef5e47188e /plugins/bluetooth.c | |
parent | d55c478a09cb438bdd7268effb75994b6abf885c (diff) | |
download | connman-3291e6583f5bdb4fc6037cd33a357890127c3a1d.tar.gz connman-3291e6583f5bdb4fc6037cd33a357890127c3a1d.tar.bz2 connman-3291e6583f5bdb4fc6037cd33a357890127c3a1d.zip |
Do not set network index from PAN disconnect reply
There is no need to track the network's connected state through its index.
As a matter of fact, setting the network index to -1 on the PAN disconnect
path can triggers segmentation faults when powering the device off at the
same time.
Diffstat (limited to 'plugins/bluetooth.c')
-rw-r--r-- | plugins/bluetooth.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c index 9a43059d..cec5e641 100644 --- a/plugins/bluetooth.c +++ b/plugins/bluetooth.c @@ -131,9 +131,6 @@ static int pan_connect(struct connman_network *network) if (path == NULL) return -EINVAL; - if (connman_network_get_index(network) >= 0) - return -EISCONN; - message = dbus_message_new_method_call(BLUEZ_SERVICE, path, BLUEZ_NETWORK_INTERFACE, CONNECT); if (message == NULL) @@ -186,7 +183,6 @@ static void disconnect_reply(DBusPendingCall *call, void *user_data) } connman_network_set_connected(network, FALSE); - connman_network_set_index(network, -1); done: dbus_message_unref(reply); @@ -205,9 +201,6 @@ static int pan_disconnect(struct connman_network *network) if (path == NULL) return -EINVAL; - if (connman_network_get_index(network) < 0) - return -ENOTCONN; - message = dbus_message_new_method_call(BLUEZ_SERVICE, path, BLUEZ_NETWORK_INTERFACE, DISCONNECT); if (message == NULL) |