summaryrefslogtreecommitdiff
path: root/audio/avrcp.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2011-10-21 15:58:27 -0200
committerJohan Hedberg <johan.hedberg@intel.com>2011-10-22 12:18:28 +0200
commit557a8ae8589f027c18ecc81e984dc1918ce27283 (patch)
treec23fbcc05265df456c4a3e67dccf0b40368dc87d /audio/avrcp.c
parentfd8dda80fc108845b9cd338b9f52624dc7e0ad96 (diff)
downloadbluez-557a8ae8589f027c18ecc81e984dc1918ce27283.tar.gz
Unregister players' events when disconnected
Diffstat (limited to 'audio/avrcp.c')
-rw-r--r--audio/avrcp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/audio/avrcp.c b/audio/avrcp.c
index e908bf4b7..f06afbf0c 100644
--- a/audio/avrcp.c
+++ b/audio/avrcp.c
@@ -1119,6 +1119,7 @@ static void state_changed(struct audio_device *dev, avctp_state_t old_state,
switch (new_state) {
case AVCTP_STATE_DISCONNECTED:
player->session = NULL;
+ player->registered_events = 0;
if (player->handler) {
avctp_unregister_pdu_handler(player->handler);