diff --git a/src/adapter.c b/src/adapter.c
index db32c7b..4d2d710 100644
--- a/src/adapter.c
+++ b/src/adapter.c
profile->adapter_remove(profile, adapter);
}
+static void adapter_add_connection(struct btd_adapter *adapter,
+ struct btd_device *device)
+{
+ if (g_slist_find(adapter->connections, device)) {
+ error("Device is already marked as connected");
+ return;
+ }
+
+ device_add_connection(device);
+
+ adapter->connections = g_slist_append(adapter->connections, device);
+}
+
static void get_connections_complete(uint8_t status, uint16_t length,
const void *param, void *user_data)
{
return agent_get(NULL);
}
-void adapter_add_connection(struct btd_adapter *adapter,
- struct btd_device *device)
-{
- if (g_slist_find(adapter->connections, device)) {
- error("Device is already marked as connected");
- return;
- }
-
- device_add_connection(device);
-
- adapter->connections = g_slist_append(adapter->connections, device);
-}
-
static void adapter_remove_connection(struct btd_adapter *adapter,
struct btd_device *device)
{
diff --git a/src/adapter.h b/src/adapter.h
index 944364b..3768e0f 100644
--- a/src/adapter.h
+++ b/src/adapter.h
void adapter_service_remove(struct btd_adapter *adapter, void *rec);
struct agent *adapter_get_agent(struct btd_adapter *adapter);
-void adapter_add_connection(struct btd_adapter *adapter,
- struct btd_device *device);
struct btd_adapter *btd_adapter_ref(struct btd_adapter *adapter);
void btd_adapter_unref(struct btd_adapter *adapter);