Set the connecting flag to FALSE upon connection failure
authorSamuel Ortiz <sameo@linux.intel.com>
Wed, 13 Jan 2010 10:32:40 +0000 (11:32 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 13 Jan 2010 10:37:52 +0000 (02:37 -0800)
When the connection really fails, connecting should be set back to FALSE.

src/network.c

index 99ee917..d11a3a5 100644 (file)
@@ -873,8 +873,10 @@ int __connman_network_connect(struct connman_network *network)
        if (err < 0) {
                if (err == -EINPROGRESS)
                        connman_network_set_associating(network, TRUE);
-               else
+               else {
+                       network->connecting = FALSE;
                        network->hidden = FALSE;
+               }
 
                return err;
        }