summaryrefslogtreecommitdiff
path: root/profiles/audio/a2dp.c
diff options
context:
space:
mode:
Diffstat (limited to 'profiles/audio/a2dp.c')
-rw-r--r--profiles/audio/a2dp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index f761dbe54..d66c22b2b 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
@@ -2668,8 +2668,6 @@ struct a2dp_sep *a2dp_add_sep(struct btd_adapter *adapter, uint8_t type,
sep->codec = codec;
sep->type = type;
sep->delay_reporting = delay_reporting;
- sep->user_data = user_data;
- sep->destroy = destroy;
if (type == AVDTP_SEP_TYPE_SOURCE) {
l = &server->sources;
@@ -2713,6 +2711,9 @@ struct a2dp_sep *a2dp_add_sep(struct btd_adapter *adapter, uint8_t type,
add:
*l = g_slist_append(*l, sep);
+ sep->user_data = user_data;
+ sep->destroy = destroy;
+
if (err)
*err = 0;
return sep;