diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index 66037f5..db2a382 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
#include <bluetooth/sdp.h>
#include <bluetooth/sdp_lib.h>
+#include "../src/adapter.h"
+
#include "log.h"
#include "device.h"
#include "manager.h"
return server;
}
-int a2dp_source_register(const bdaddr_t *src, GKeyFile *config)
+int a2dp_source_register(struct btd_adapter *adapter, GKeyFile *config)
{
struct a2dp_server *server;
- server = find_server(servers, src);
+ server = find_server(servers, adapter_get_address(adapter));
if (server != NULL)
goto done;
- server = a2dp_server_register(src, config);
+ server = a2dp_server_register(adapter_get_address(adapter), config);
if (server == NULL)
return -EPROTONOSUPPORT;
return 0;
}
-int a2dp_sink_register(const bdaddr_t *src, GKeyFile *config)
+int a2dp_sink_register(struct btd_adapter *adapter, GKeyFile *config)
{
struct a2dp_server *server;
- server = find_server(servers, src);
+ server = find_server(servers, adapter_get_address(adapter));
if (server != NULL)
goto done;
- server = a2dp_server_register(src, config);
+ server = a2dp_server_register(adapter_get_address(adapter), config);
if (server == NULL)
return -EPROTONOSUPPORT;
diff --git a/profiles/audio/a2dp.h b/profiles/audio/a2dp.h
index f0e3ee6..bd3d590 100644
--- a/profiles/audio/a2dp.h
+++ b/profiles/audio/a2dp.h
struct avdtp_error *err,
void *user_data);
-int a2dp_source_register(const bdaddr_t *src, GKeyFile *config);
-int a2dp_sink_register(const bdaddr_t *src, GKeyFile *config);
+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);
struct a2dp_sep *a2dp_add_sep(const bdaddr_t *src, uint8_t type,
diff --git a/profiles/audio/manager.c b/profiles/audio/manager.c
index 0f6a4f7..4c74753 100644
--- a/profiles/audio/manager.c
+++ b/profiles/audio/manager.c
audio_adapter_unref(adp); /* Referenced by a2dp server */
- return a2dp_source_register(adapter_get_address(adapter), config);
+ return a2dp_source_register(adapter, config);
}
static int a2dp_sink_server_probe(struct btd_profile *p,
audio_adapter_unref(adp); /* Referenced by a2dp server */
- return a2dp_sink_register(adapter_get_address(adapter), config);
+ return a2dp_sink_register(adapter, config);
}
static int avrcp_server_probe(struct btd_profile *p,
diff --git a/profiles/audio/sink.c b/profiles/audio/sink.c
index 02e1a65..8c49961 100644
--- a/profiles/audio/sink.c
+++ b/profiles/audio/sink.c
#include "log.h"
+#include "../src/adapter.h"
+#include "../src/device.h"
+
#include "device.h"
#include "avdtp.h"
#include "media.h"
#include "manager.h"
#include "sink.h"
#include "dbus-common.h"
-#include "../src/adapter.h"
-#include "../src/device.h"
#define STREAM_SETUP_RETRY_TIMER 2
diff --git a/profiles/audio/source.c b/profiles/audio/source.c
index da312d4..3c9143c 100644
--- a/profiles/audio/source.c
+++ b/profiles/audio/source.c
#include "log.h"
+#include "../src/adapter.h"
+#include "../src/device.h"
+
#include "device.h"
#include "avdtp.h"
#include "media.h"
#include "manager.h"
#include "source.h"
#include "dbus-common.h"
-#include "../src/adapter.h"
-#include "../src/device.h"
#define STREAM_SETUP_RETRY_TIMER 2