From 949f11c643676c6b0aa2317a4a7e0555cb8334b2 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 20 Jun 2013 12:16:07 +0200 Subject: [PATCH] client: emit new-session when new session is created Only emit new-session when we created a new session for a client, not when a client picked up a previous session. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=701587 --- gst/rtsp-server/rtsp-client.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index 39210bc1c4..d5c7087b4a 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -1307,6 +1307,10 @@ handle_setup_request (GstRTSPClient * client, GstRTSPClientState * state) if (!(session = gst_rtsp_session_pool_create (priv->session_pool))) goto service_unavailable; + /* signal new session */ + g_signal_emit (client, gst_rtsp_client_signals[SIGNAL_NEW_SESSION], 0, + session); + state->session = session; /* we need a new media configuration in this session */ @@ -1694,9 +1698,6 @@ client_watch_session (GstRTSPClient * client, GstRTSPSession * session) g_object_weak_ref (G_OBJECT (session), (GWeakNotify) client_session_finalized, client); priv->sessions = g_list_prepend (priv->sessions, session); - - g_signal_emit (client, gst_rtsp_client_signals[SIGNAL_NEW_SESSION], 0, - session); } static void