Diff between 5202b838b8cf33f04d1992db50d4bc8a146358b9 and d81d04e8b72c34f54f265e7794bb3d69af6fbde7

Changed Files

File Additions Deletions Status
profiles/audio/a2dp.c +3 -3 modified
profiles/audio/a2dp.h +1 -1 modified

Full Patch

diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index db2a382..2cf9f9c 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
@@ -1228,11 +1228,11 @@ static void a2dp_unregister_sep(struct a2dp_sep *sep)
 	g_free(sep);
 }
 
-void a2dp_unregister(const bdaddr_t *src)
+void a2dp_unregister(struct btd_adapter *adapter)
 {
 	struct a2dp_server *server;
 
-	server = find_server(servers, src);
+	server = find_server(servers, adapter_get_address(adapter));
 	if (!server)
 		return;
 
@@ -1240,7 +1240,7 @@ void a2dp_unregister(const bdaddr_t *src)
 	g_slist_free_full(server->sources,
 					(GDestroyNotify) a2dp_unregister_sep);
 
-	avdtp_exit(src);
+	avdtp_exit(adapter_get_address(adapter));
 
 	servers = g_slist_remove(servers, server);
 
diff --git a/profiles/audio/a2dp.h b/profiles/audio/a2dp.h
index bd3d590..09e1917 100644
--- a/profiles/audio/a2dp.h
+++ b/profiles/audio/a2dp.h
@@ -66,7 +66,7 @@ typedef void (*a2dp_stream_cb_t) (struct avdtp *session,
 
 int a2dp_source_register(struct btd_adapter *adapter, GKeyFile *config);
 int a2dp_sink_register(struct btd_adapter *adapter, GKeyFile *config);
-void a2dp_unregister(const bdaddr_t *src);
+void a2dp_unregister(struct btd_adapter *adapter);
 
 struct a2dp_sep *a2dp_add_sep(const bdaddr_t *src, uint8_t type,
 				uint8_t codec, gboolean delay_reporting,