Disconnect currently connected networks first
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 20 May 2009 23:09:20 +0000 (16:09 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 20 May 2009 23:09:20 +0000 (16:09 -0700)
src/network.c

index bffa550..14330d8 100644 (file)
@@ -819,6 +819,8 @@ int __connman_network_connect(struct connman_network *network)
        if (network->driver->connect == NULL)
                return -ENOSYS;
 
+       __connman_device_disconnect(network->device);
+
        err = network->driver->connect(network);
        if (err == 0) {
                network->connected = TRUE;