summaryrefslogtreecommitdiff
path: root/plugins/bluetooth.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-02-10 20:44:36 +0100
committerMarcel Holtmann <marcel@holtmann.org>2010-02-11 05:33:55 +0100
commitb7d93813b4f141ff26356f305f2c0881f7d20cf0 (patch)
tree7413cda8fd5b8b9c70b8a31ffae5fa6ec0bb6478 /plugins/bluetooth.c
parent648d5be5ee5830b3b056c78b86c34899f411c47c (diff)
downloadconnman-b7d93813b4f141ff26356f305f2c0881f7d20cf0.tar.gz
connman-b7d93813b4f141ff26356f305f2c0881f7d20cf0.tar.bz2
connman-b7d93813b4f141ff26356f305f2c0881f7d20cf0.zip
Bring bluetooth interfaces up at startup
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.
Diffstat (limited to 'plugins/bluetooth.c')
-rw-r--r--plugins/bluetooth.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/bluetooth.c b/plugins/bluetooth.c
index 67808742..ef852dd4 100644
--- a/plugins/bluetooth.c
+++ b/plugins/bluetooth.c
@@ -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;