Set device scanning state to false from the scan callback
authorSamuel Ortiz <sameo@linux.intel.com>
Mon, 27 Sep 2010 22:59:52 +0000 (00:59 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 27 Sep 2010 22:59:52 +0000 (00:59 +0200)
If scan fails, the scan callback is called.
When scan results are available, it is called as well.
In both cases, the device is no longer scanning when it's called.

plugins/wifi.c

index a5c10db..8dafe9f 100644 (file)
@@ -231,12 +231,7 @@ static void scan_callback(int result, GSupplicantInterface *interface,
 
        DBG("result %d", result);
 
-       if (result < 0) {
-               connman_device_set_scanning(device, FALSE);
-               return;
-       }
-
-       connman_device_set_scanning(device, TRUE);
+       connman_device_set_scanning(device, FALSE);
 }
 
 static int wifi_scan(struct connman_device *device)