summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Zabaluev <mikhail.zabaluev@nokia.com>2010-08-26 19:40:39 +0300
committerMikhail Zabaluev <mikhail.zabaluev@nokia.com>2010-08-26 19:40:39 +0300
commitfa3ba5a5dd2b58e978e023a47093942516ab19c6 (patch)
tree6b9ad1bfaf79a123904eb0ea3ceaaa4e54db501e
parent19581f4d56a510a554adac177473d7b91e251a42 (diff)
Evaluate if the local handle is in the local pending before removing it
The stupid mistake prevented us from properly signaling call rejection.
-rw-r--r--src/sip-media-channel.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sip-media-channel.c b/src/sip-media-channel.c
index 2177f63..0141adb 100644
--- a/src/sip-media-channel.c
+++ b/src/sip-media-channel.c
@@ -1794,6 +1794,7 @@ tpsip_media_channel_remove_with_reason (GObject *obj,
TpGroupMixin *mixin = TP_GROUP_MIXIN (obj);
TpIntSet *set = NULL;
TpHandle self_handle;
+ gboolean rejected;
self_handle = mixin->self_handle;
@@ -1814,6 +1815,9 @@ tpsip_media_channel_remove_with_reason (GObject *obj,
return FALSE;
}
+ rejected = (handle == self_handle
+ && tp_handle_set_is_member (mixin->local_pending, handle));
+
/* We have excluded all the problem cases.
* Now we always want to remove both members on behalf of the local user */
set = tp_intset_new ();
@@ -1827,8 +1831,7 @@ tpsip_media_channel_remove_with_reason (GObject *obj,
self_handle, 0);
tp_intset_destroy (set);
- if (handle == self_handle
- && tp_handle_set_is_member (mixin->local_pending, handle))
+ if (rejected)
{
/* The user has rejected the call */