diff options
Diffstat (limited to 'src/adapter.c')
-rw-r--r-- | src/adapter.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/adapter.c b/src/adapter.c index 6797820d..1c99801b 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -1164,6 +1164,25 @@ struct btd_device *adapter_find_device(struct btd_adapter *adapter, const char * return device; } +static void adapter_update_devices(struct btd_adapter *adapter) +{ + char **devices; + int i; + GSList *l; + + /* Devices */ + devices = g_new0(char *, g_slist_length(adapter->devices) + 1); + for (i = 0, l = adapter->devices; l; l = l->next, i++) { + struct btd_device *dev = l->data; + devices[i] = (char *) device_get_path(dev); + } + + emit_array_property_changed(connection, adapter->path, + ADAPTER_INTERFACE, "Devices", + DBUS_TYPE_OBJECT_PATH, &devices); + g_free(devices); +} + struct btd_device *adapter_create_device(DBusConnection *conn, struct btd_adapter *adapter, const char *address) { @@ -3498,25 +3517,6 @@ int btd_cancel_authorization(const bdaddr_t *src, const bdaddr_t *dst) return agent_cancel(agent); } -void adapter_update_devices(struct btd_adapter *adapter) -{ - char **devices; - int i; - GSList *l; - - /* Devices */ - devices = g_new0(char *, g_slist_length(adapter->devices) + 1); - for (i = 0, l = adapter->devices; l; l = l->next, i++) { - struct btd_device *dev = l->data; - devices[i] = (char *) device_get_path(dev); - } - - emit_array_property_changed(connection, adapter->path, - ADAPTER_INTERFACE, "Devices", - DBUS_TYPE_OBJECT_PATH, &devices); - g_free(devices); -} - static gchar *adapter_any_path = NULL; static int adapter_any_refcount = 0; |