Diff between e21680c9355a0f9d5ef6d4a5ae032de274e87b37 and 44e1bcffcd491ae1e7d5904e44c9bc6d296d0093

Changed Files

File Additions Deletions Status
profiles/audio/transport.c +3 -3 modified

Full Patch

diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index 8248014..d158fc9 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
@@ -659,14 +659,14 @@ static void set_volume(const GDBusPropertyTable *property,
 	if (a2dp->volume == volume)
 		return;
 
-	a2dp->volume = volume;
-
 	notify = transport->source_watch ? true : false;
-	if (notify)
+	if (notify) {
+		a2dp->volume = volume;
 		g_dbus_emit_property_changed(btd_get_dbus_connection(),
 						transport->path,
 						MEDIA_TRANSPORT_INTERFACE,
 						"Volume");
+	}
 
 	avrcp_set_volume(transport->device, volume, notify);
 	return;