mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-08 04:45:31 +00:00
mm-origin: Avoid unnecessary allocation
This commit is contained in:
parent
0232430ae1
commit
6f771b1685
1 changed files with 4 additions and 9 deletions
|
@ -551,7 +551,6 @@ call_deleted_cb (MMModemVoice *voice,
|
||||||
{
|
{
|
||||||
gpointer call;
|
gpointer call;
|
||||||
gpointer key;
|
gpointer key;
|
||||||
GString *reason;
|
|
||||||
const char *mm_reason;
|
const char *mm_reason;
|
||||||
|
|
||||||
g_debug ("Removing call `%s'", path);
|
g_debug ("Removing call `%s'", path);
|
||||||
|
@ -565,17 +564,13 @@ call_deleted_cb (MMModemVoice *voice,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
reason = g_string_new ("Call removed");
|
|
||||||
|
|
||||||
mm_reason = calls_mm_call_get_disconnect_reason (CALLS_MM_CALL (call));
|
mm_reason = calls_mm_call_get_disconnect_reason (CALLS_MM_CALL (call));
|
||||||
if (mm_reason) {
|
g_signal_emit_by_name (self,
|
||||||
g_string_assign (reason, mm_reason);
|
"call-removed",
|
||||||
}
|
call,
|
||||||
|
mm_reason ?: "Call removed");
|
||||||
g_signal_emit_by_name (self, "call-removed", call, reason);
|
|
||||||
|
|
||||||
g_object_unref (call);
|
g_object_unref (call);
|
||||||
g_string_free (reason, TRUE);
|
|
||||||
|
|
||||||
g_debug ("Removed call `%s'", path);
|
g_debug ("Removed call `%s'", path);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue