OSDN Git Service

Unregister players' events when disconnected
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Fri, 21 Oct 2011 17:58:27 +0000 (15:58 -0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Sat, 22 Oct 2011 10:18:28 +0000 (12:18 +0200)
audio/avrcp.c

index e908bf4..f06afbf 100644 (file)
@@ -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);