Report a connected network as that and not as in progress
authorMarcel Holtmann <marcel@holtmann.org>
Thu, 16 Jul 2009 05:25:02 +0000 (07:25 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 16 Jul 2009 05:25:02 +0000 (07:25 +0200)
src/network.c

index 705feec..3f05dfe 100644 (file)
@@ -857,8 +857,10 @@ int __connman_network_connect(struct connman_network *network)
 
        DBG("network %p", network);
 
-       if (network->connected == TRUE || network->connecting == TRUE ||
-                                               network->associating == TRUE)
+       if (network->connected == TRUE)
+               return -EISCONN;
+
+       if (network->connecting == TRUE || network->associating == TRUE)
                return -EALREADY;
 
        if (network->driver == NULL)