Bring bluetooth interfaces up at startup
authorSamuel Ortiz <sameo@linux.intel.com>
Wed, 10 Feb 2010 19:44:36 +0000 (20:44 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 11 Feb 2010 04:33:55 +0000 (05:33 +0100)
With the current code we're powering up the bluetooth devices through
change_powered, which gets indirectly called from connman_device_register()
through adapter_properties_reply(). Since we're calling
connman_device_register() withouth setting the device path, change_powered
actually does nothing. We have to set the device path before calling
connman_device_register() and then the bluetooth devices will actually be
powered up.

plugins/bluetooth.c

index 6780874..ef852dd 100644 (file)
@@ -625,6 +625,8 @@ static void adapter_properties_reply(DBusPendingCall *call, void *user_data)
 
        connman_device_set_mode(device, CONNMAN_DEVICE_MODE_NETWORK_MULTIPLE);
 
+       connman_device_set_string(device, "Path", path);
+
        if (connman_device_register(device) < 0) {
                connman_device_unref(device);
                goto done;