[telepathy-gabble/master] Simplify gabble_media_channel_close
Will Thompson
will.thompson at collabora.co.uk
Thu Apr 9 10:46:06 PDT 2009
---
src/media-channel.c | 22 +++++++---------------
1 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/src/media-channel.c b/src/media-channel.c
index 9635e1a..b81879a 100644
--- a/src/media-channel.c
+++ b/src/media-channel.c
@@ -859,28 +859,20 @@ gabble_media_channel_close_async (TpSvcChannel *iface,
static void
gabble_media_channel_close (GabbleMediaChannel *self)
{
- GabbleMediaChannelPrivate *priv;
+ GabbleMediaChannelPrivate *priv = self->priv;
DEBUG ("called on %p", self);
- g_assert (GABBLE_IS_MEDIA_CHANNEL (self));
-
- priv = self->priv;
-
- if (priv->closed)
+ if (!priv->closed)
{
- return;
- }
+ priv->closed = TRUE;
- priv->closed = TRUE;
+ if (priv->session != NULL)
+ gabble_jingle_session_terminate (priv->session,
+ TP_CHANNEL_GROUP_CHANGE_REASON_NONE, NULL);
- if (priv->session)
- {
- gabble_jingle_session_terminate (priv->session,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE, NULL);
+ tp_svc_channel_emit_closed (self);
}
-
- tp_svc_channel_emit_closed (self);
}
--
1.5.6.5
More information about the telepathy-commits
mailing list