mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-12 03:39:54 +00:00
avrcp_controller: report notification status only initially, after registration
This commit is contained in:
parent
274ca16f8e
commit
bc3843bf59
@ -745,11 +745,13 @@ static void avrcp_controller_handle_notification(avrcp_connection_t *connection,
|
||||
case AVRCP_CTYPE_RESPONSE_INTERIM:
|
||||
// register as enabled
|
||||
connection->notifications_enabled |= event_mask;
|
||||
avrcp_controller_emit_notification_complete(connection, ERROR_CODE_SUCCESS, event_id);
|
||||
|
||||
// check if initial value is already sent
|
||||
if ( (connection->initial_status_reported & event_mask) > 0 ){
|
||||
if ( (connection->initial_status_reported & event_mask) != 0 ){
|
||||
return;
|
||||
}
|
||||
// emit event only once, initially
|
||||
avrcp_controller_emit_notification_complete(connection, ERROR_CODE_SUCCESS, event_id);
|
||||
connection->initial_status_reported |= event_mask;
|
||||
break;
|
||||
case AVRCP_CTYPE_RESPONSE_CHANGED_STABLE:
|
||||
|
Loading…
x
Reference in New Issue
Block a user