HI Marcel
Before join network, we need to disconnect the device firstly.

>From 3f434042821f6498d7d8bc59e431d2b00315c4df Mon Sep 17 00:00:00 2001
From: Martin Xu <[email protected]>
Date: Wed, 8 Jul 2009 05:37:44 -0400
Subject: [PATCH 1/5] disconnect device before join network

---
 src/device.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/device.c b/src/device.c
index ec28eb0..e50e9f0 100644
--- a/src/device.c
+++ b/src/device.c
@@ -637,6 +637,9 @@ static DBusMessage *join_network(DBusConnection *conn,
 
        connman_network_set_protocol(network, CONNMAN_NETWORK_PROTOCOL_IP);
 
+       if (connman_device_get_disconnected(device) == FALSE)
+               __connman_device_disconnect(device);
+
        err = device->driver->join(device, network);
 
        connman_network_unref(network);
-- 
1.6.1.3

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to