From 5b250f7d20c6f8b8864853f19a656f28899bc2cc Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 26 Feb 2009 18:45:35 +0200 Subject: Unregister old stream callback before registering a new one --- audio/unix.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'audio/unix.c') 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; -- cgit