OSDN Git Service

AVRCP: fix changed notification
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 29 Sep 2011 17:07:28 +0000 (14:07 -0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Sun, 2 Oct 2011 15:52:05 +0000 (18:52 +0300)
We sure want to send notifications only when section is not NULL.
Otherwise we either crash or do not send the expected notification.

audio/avrcp.c

index ac9a107..e5b51db 100644 (file)
@@ -549,7 +549,7 @@ static int avrcp_send_event(struct media_player *mp, uint8_t id, void *data)
        uint16_t size;
        int err;
 
-       if (mp->session)
+       if (mp->session == NULL)
                return -ENOTCONN;
 
        if (!(mp->registered_events & (1 << id)))