Set idle state after disconnecting device
authorMartin Xu <martin.xu@intel.com>
Fri, 10 Jul 2009 06:17:34 +0000 (14:17 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 10 Jul 2009 06:52:30 +0000 (23:52 -0700)
src/device.c

index e50e9f0..afad14c 100644 (file)
@@ -174,9 +174,15 @@ static int set_connected(struct connman_device *device,
                                        CONNMAN_SERVICE_STATE_CONFIGURATION);
                }
        } else {
+               struct connman_service *service;
+
                connman_element_unregister_children(&device->element);
 
                device->disconnected = TRUE;
+
+               service = __connman_service_lookup_from_device(device);
+               __connman_service_indicate_state(service,
+                                       CONNMAN_SERVICE_STATE_IDLE);
        }
 
        return 0;