Diff between 86a6ea1f834779ff2a9afed4ffbf9990249d9b09 and 8b62dc61549577667db3dad0fff02dd7f5f9b350

Changed Files

File Additions Deletions Status
profiles/audio/media.c +6 -1 modified

Full Patch

diff --git a/profiles/audio/media.c b/profiles/audio/media.c
index 2c7d0cb..fa5c013 100644
--- a/profiles/audio/media.c
+++ b/profiles/audio/media.c
@@ -1059,12 +1059,17 @@ static int set_setting(const char *key, const char *value, void *user_data)
 	const char *iface = MEDIA_PLAYER_INTERFACE;
 	DBusMessage *msg;
 	DBusMessageIter iter;
+	const char *curval;
 
 	DBG("%s = %s", key, value);
 
-	if (!g_hash_table_lookup(mp->settings, key))
+	curval = g_hash_table_lookup(mp->settings, key);
+	if (!curval)
 		return -EINVAL;
 
+	if (strcasecmp(curval, value) == 0)
+		return 0;
+
 	msg = dbus_message_new_method_call(mp->sender, mp->path,
 					DBUS_INTERFACE_PROPERTIES, "Set");
 	if (msg == NULL) {