Restart scanning after disconnecting
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 13 Dec 2008 18:56:05 +0000 (19:56 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 13 Dec 2008 18:56:05 +0000 (19:56 +0100)
plugins/wifi.c

index ed3a68e..67ac993 100644 (file)
@@ -190,7 +190,8 @@ static void state_change(struct connman_element *device,
 
        DBG("state %d", state);
 
-       if (state == STATE_INACTIVE && data->inactive_timer == 0)
+       if ((state == STATE_INACTIVE || state == STATE_DISCONNECTED) &&
+                                               data->inactive_timer == 0)
                data->inactive_timer = g_timeout_add_seconds(INACTIVE_TIMEOUT,
                                                        inactive_scan, device);