[Bug 650887] Adding function to close all current sessions

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue May 24 01:04:32 PDT 2011


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

Sebastian Dröge <slomo> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #188406|none                        |needs-work
             status|                            |

--- Comment #1 from Sebastian Dröge <slomo at circular-chaos.org> 2011-05-24 08:04:25 UTC ---
Review of attachment 188406:
 --> (https://bugzilla.gnome.org/review?bug=650887&attachment=188406)

::: gst-rtsp-server-0.10.8.orig/src/gst/rtsp-server/rtsp-server.c
@@ +390,3 @@
+
+  g_mutex_lock (server->lock);
+  clients_list = server->clients;

You should return a copy of that list, with every element of the list having
the refcount increased by one. The way you're doing it is not threadsafe
because the list can change at any point and the caller does not own any
references to the clients.

@@ +415,3 @@
+  {
+    perror("closing connection");
+    exit(0);

Calling exit() from a library is in general not very nice. Don't do that and
also don't use perror.

Use something like GST_ERROR() or GST_ERROR_OBJECT() and then just continue as
if nothing happened. Or if this is really a very bad error, use a g_warning()
or g_critical() and continue.

-- 
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