Diff between 4d55915b1727843b25e8b06a822125761041fc7b and 5ec9370a76c232e69fb3708d08c136b8c8c81f4a

Changed Files

File Additions Deletions Status
src/adapter.c +13 -13 modified
src/adapter.h +0 -2 modified

Full Patch

diff --git a/src/adapter.c b/src/adapter.c
index db32c7b..4d2d710 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2117,6 +2117,19 @@ void adapter_remove_profile(struct btd_adapter *adapter, gpointer p)
 		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)
 {
@@ -3576,19 +3589,6 @@ struct agent *adapter_get_agent(struct btd_adapter *adapter)
 	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
@@ -108,8 +108,6 @@ void adapter_service_insert(struct btd_adapter *adapter, void *rec);
 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);