[PATCH 1/5] disconnect device before join network

Martin Xu martin.xu at intel.com
Wed Jul 8 02:37:44 PDT 2009


---
 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,
=20
 	connman_network_set_protocol(network, CONNMAN_NETWORK_PROTOCOL_IP);
=20
+	if (connman_device_get_disconnected(device) =3D=3D FALSE)
+		__connman_device_disconnect(device);
+
 	err =3D device->driver->join(device, network);
=20
 	connman_network_unref(network);
--=20
1.6.1.3



More information about the connman mailing list