summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert McQueen <robert.mcqueen@collabora.co.uk>2008-02-22 15:00:57 +0000
committerRobert McQueen <robert.mcqueen@collabora.co.uk>2008-02-22 15:00:57 +0000
commit272e7053690acd20e4fd41406b010ad165b94bee (patch)
treeb3167dad04da7ba4f72ddc61058f26bccb618026
parentf0aebf118778d59953343017a2f68c216c5556a3 (diff)
don't emit NewStreamHandler signals multiple times if Ready is called multiple times on the SessionHandler
-rw-r--r--src/gabble-media-session.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gabble-media-session.c b/src/gabble-media-session.c
index 5c038cd52..8c1115553 100644
--- a/src/gabble-media-session.c
+++ b/src/gabble-media-session.c
@@ -657,18 +657,18 @@ gabble_media_session_ready (TpSvcMediaSessionHandler *iface,
DBusGMethodInvocation *context)
{
GabbleMediaSession *self = GABBLE_MEDIA_SESSION (iface);
- GabbleMediaSessionPrivate *priv;
+ GabbleMediaSessionPrivate *priv = GABBLE_MEDIA_SESSION_GET_PRIVATE (self);
guint i;
- g_assert (GABBLE_IS_MEDIA_SESSION (self));
-
- priv = GABBLE_MEDIA_SESSION_GET_PRIVATE (self);
+ if (priv->ready)
+ goto out;
priv->ready = TRUE;
for (i = 0; i < priv->streams->len; i++)
_emit_new_stream (self, g_ptr_array_index (priv->streams, i));
+out:
tp_svc_media_session_handler_return_from_ready (context);
}