[Bug 701587] rtsp-client: send new-session signal at the right time.

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Jun 18 06:15:48 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=701587
  GStreamer | gst-rtsp-server | 1.0.6

--- Comment #3 from Patricia Muscalu <patricia at axis.com> 2013-06-18 13:15:46 UTC ---
@@ -1252,6 +1277,18 @@ handle_setup_request (GstRTSPClient * client,
GstRTSPClientState * state)

     /* we need a new media configuration in this session */
     sessmedia = NULL;
+
+    /* find the session in the session pool */
+    sessid = gst_rtsp_session_get_sessionid (session);
+    if (!(session = gst_rtsp_session_pool_find (priv->session_pool, sessid)))
+      goto no_session;

I realize, that these code line are not really need. However, I do not
understand how the code would result in a leaked (previous?) session. Please
explain.


static void
 handle_request (GstRTSPClient * client, GstRTSPMessage * request)
@@ -1672,10 +1693,6 @@ handle_request (GstRTSPClient * client, GstRTSPMessage *
request)
     if (!(session = gst_rtsp_session_pool_find (priv->session_pool, sessid)))
       goto session_not_found;

-    /* we add the session to the client list of watched sessions. When a
session
-     * disappears because it times out, we will be notified. If all sessions
are
-     * gone, we will close the connection */
-    client_watch_session (client, session);
   }

I don't understand your comment.
What's done here is that client_watch_session is called as soon as the SETUP
request is received, just before the SETUP response is generated and sent to
the client. Doing that, the new-session signal is sent at the right time and
it's possible e.g, to configure session timeout (<=> we make sure that correct
timeout parameter in the session response header is included). Without this
patch, the new-signal is sent as soon as the received request includes the
session header (<=> the SETUP request has been previously handled).

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list