summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2012-03-28 17:44:25 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2012-03-28 17:44:25 -0400
commite39480b3d476bc10675f49e4500bc3b1e35a64aa (patch)
tree85d51e23c31e6465df496c8527aaa7dda5e03b2e
parentd834c43aff5c92a9b61723c8812c0cd536542513 (diff)
downloadtelepathy-logger-e39480b3d476bc10675f49e4500bc3b1e35a64aa.tar.gz
Be safe when CM sends change state multiple times
I've notice that Gabble sends the ended state twice some times. This is a but in the CM, but better be safe.
-rw-r--r--telepathy-logger/call-channel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/telepathy-logger/call-channel.c b/telepathy-logger/call-channel.c
index 4aa95fd..fc7b95b 100644
--- a/telepathy-logger/call-channel.c
+++ b/telepathy-logger/call-channel.c
@@ -208,6 +208,9 @@ call_state_changed_cb (TpCallChannel *call,
case TP_CALL_STATE_ENDED:
{
+ if (priv->end_actor != NULL)
+ g_object_unref (priv->end_actor);
+
priv->end_actor = g_hash_table_lookup (priv->entities,
GUINT_TO_POINTER (reason->actor));
@@ -219,6 +222,8 @@ call_state_changed_cb (TpCallChannel *call,
priv->end_reason = reason->reason;
+ g_free (priv->detailed_end_reason);
+
if (reason->dbus_reason == NULL)
priv->detailed_end_reason = g_strdup ("");
else