Hi Lucas, On Thu, Oct 6, 2011 at 2:49 PM, Lucas De Marchi <lucas.demarchi@xxxxxxxxxxxxxx> wrote: > 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 +++ > doc/media-api.txt | 2 +- > 2 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/audio/media.c b/audio/media.c > index 9057d70..8d7b65b 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"); > diff --git a/doc/media-api.txt b/doc/media-api.txt > index af4cfa0..7dc7661 100644 > --- a/doc/media-api.txt > +++ b/doc/media-api.txt > @@ -133,7 +133,7 @@ Object path freely definable > Methods void SetProperty(string property, variant value) > > Changes the value of the specified property. Only > - properties that are listed a read-write can be changed. > + properties that are listed as read-write can be changed. > > On success this will emit a PropertyChanged signal. > > -- > 1.7.7 Ack. -- Luiz Augusto von Dentz -- 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