ofono: Fix infinite recursion in network disconnect
authorHenri Bragge <henri.bragge@ixonos.com>
Thu, 17 Feb 2011 11:51:47 +0000 (13:51 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 17 Feb 2011 23:55:55 +0000 (00:55 +0100)
If association takes too long and connection timeout goes off, then
connman will try to disconnect and ends up in infinite recursion when
__connman_network_disconnect() and connman_network_set_connected() call
each other.

plugins/ofono.c

index 066e9b71406f3eda098c5b5668fa5f5b9cec9f92..ed6317bd186b5dc917e4dc8765e2f700f9b38e1f 100644 (file)
@@ -489,6 +489,8 @@ static int network_disconnect(struct connman_network *network)
        if (connman_network_get_index(network) < 0)
                return -ENOTCONN;
 
+       connman_network_set_associating(network, FALSE);
+
        return set_network_active(network, FALSE);
 }