summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-02-26 18:45:35 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-02-26 18:50:52 +0200
commit5b250f7d20c6f8b8864853f19a656f28899bc2cc (patch)
tree6bdc80db0bf64cfeb36fc5534f5de0a31834e1fb
parent683c7b002a92e03ac808d22fa1cbd791aa94fce0 (diff)
Unregister old stream callback before registering a new one
-rw-r--r--audio/unix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/unix.c b/audio/unix.c
index 2255b263..f66ffc71 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -523,6 +523,10 @@ static void a2dp_config_complete(struct avdtp *session, struct a2dp_sep *sep,
goto failed;
}
+ if (client->cb_id > 0)
+ avdtp_stream_remove_cb(a2dp->session, a2dp->stream,
+ client->cb_id);
+
a2dp->sep = sep;
a2dp->stream = stream;