[Telepathy-commits] [telepathy-glib/master] ExampleCallableMediaChannel: assert that removed member is us
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Mar 13 06:33:31 PDT 2009
The group flags in this implementation never allow the peer to be removed,
so this is safe to assert.
---
examples/cm/callable/media-channel.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/examples/cm/callable/media-channel.c b/examples/cm/callable/media-channel.c
index 9b44b87..56dc158 100644
--- a/examples/cm/callable/media-channel.c
+++ b/examples/cm/callable/media-channel.c
@@ -463,15 +463,12 @@ remove_member_with_reason (GObject *object,
{
ExampleCallableMediaChannel *self = EXAMPLE_CALLABLE_MEDIA_CHANNEL (object);
- /* The TpGroupMixin won't call this unless member is in one of the sets,
- * which means either it's the local user or the peer. */
-
- g_assert (member == self->group.self_handle || member == self->priv->handle);
+ /* The TpGroupMixin won't call this unless removing the member is allowed
+ * by the group flags, which in this case means it must be our own handle
+ * (because the other user never appears in local-pending).
+ */
- /* FIXME: Gabble disallows removing handles that are not our self handle
- * unless we created the channel. That doesn't seem right... bug? Or should
- * we mimic its behaviour, so people who interop with this example will
- * also interop with Gabble? */
+ g_assert (member == self->group.self_handle);
example_callable_media_channel_close (self, reason);
return TRUE;
--
1.5.6.5
More information about the telepathy-commits
mailing list