base-call: don't notify a state change if it didn't change

This commit is contained in:
Aleksander Morgado
2018-06-14 13:10:38 +02:00
committed by Dan Williams
parent 60d42de68e
commit 9a69e5363a

View File

@@ -544,10 +544,13 @@ mm_base_call_change_state (MMBaseCall *self,
MMCallState new_state, MMCallState new_state,
MMCallStateReason reason) MMCallStateReason reason)
{ {
int old_state; MMCallState old_state;
old_state = mm_gdbus_call_get_state (MM_GDBUS_CALL (self)); old_state = mm_gdbus_call_get_state (MM_GDBUS_CALL (self));
if (old_state == new_state)
return;
g_object_set (self, g_object_set (self,
"state", new_state, "state", new_state,
"state-reason", reason, "state-reason", reason,