dnsproxy: Only one copy of the relevant buffers will be made to a TCP request
[framework/connectivity/connman.git] / src / device.c
index 9625444..3a5e467 100644 (file)
@@ -593,13 +593,12 @@ int connman_device_set_powered(struct connman_device *device,
 
        type = __connman_device_get_service_type(device);
 
-       if (device->powered == TRUE)
-               __connman_technology_enabled(type);
-       else
+       if (device->powered == FALSE) {
                __connman_technology_disabled(type);
-
-       if (powered == FALSE)
                return 0;
+       }
+
+       __connman_technology_enabled(type);
 
        connman_device_set_disconnected(device, FALSE);
        device->scanning = FALSE;
@@ -705,8 +704,6 @@ connman_bool_t connman_device_get_scanning(struct connman_device *device)
 
 void connman_device_reset_scanning(struct connman_device *device)
 {
-       device->scanning = FALSE;
-
        g_hash_table_foreach(device->networks,
                                mark_network_available, NULL);
 }