From c7f32491a8e030ecf15fd236fd999ca7cfb9942c Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Thu, 6 Oct 2011 08:49:45 -0300 Subject: [PATCH] AVRCP: do not allow CT to set a property not supported If player never set a property, it means it doesn't support it. Doesn't allow the remote side to set it and send a REJECTED response. --- audio/media.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/audio/media.c b/audio/media.c index 9057d7041..8d7b65b2c 100644 --- a/audio/media.c +++ b/audio/media.c @@ -1126,6 +1126,9 @@ static int set_setting(uint8_t attr, uint8_t val, void *user_data) if (property == NULL || value == NULL) return -EINVAL; + if (!g_hash_table_lookup(mp->settings, GUINT_TO_POINTER(attr))) + return -EINVAL; + msg = dbus_message_new_method_call(mp->sender, mp->path, MEDIA_PLAYER_INTERFACE, "SetProperty"); -- 2.47.3