From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> It is not longer necessary to have a player to be able to register the extra pdu handlers. --- audio/avrcp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/audio/avrcp.c b/audio/avrcp.c index 2e36fb7..21d105a 100644 --- a/audio/avrcp.c +++ b/audio/avrcp.c @@ -1467,6 +1467,9 @@ int avrcp_register(const bdaddr_t *src, GKeyFile *config) servers = g_slist_append(servers, server); + if (!avctp_id) + avctp_id = avctp_add_state_cb(state_changed, NULL); + return 0; } @@ -1527,9 +1530,6 @@ struct avrcp_player *avrcp_register_player(const bdaddr_t *src, player->user_data = user_data; player->destroy = destroy; - if (!avctp_id) - avctp_id = avctp_add_state_cb(state_changed, NULL); - server->players = g_slist_append(server->players, player); /* Assign player to session without current player */ -- 1.7.11.4 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html