GNOME Bugzilla – Bug 339574
[patch] Race condition in multifdsink can lead to spurious duplicate clients
Last modified: 2006-04-28 15:31:39 UTC
multifdsink has a client-removed signal, which is intended to be used so that an application can call the get-stats signal, and then close the file descriptor. Unfortunately, if you do this, a new file descriptor (for a new client) with the same value as the old one you just closed, could get added before multifdsink removes the FD from its data-structures. Multifdsink would reject this as a duplicate (which it is not). To fix this, we need to add a new signal that is fired only once multifdsink no longer has any reference to the FD, to indicate to the application that it's safe to close (and thus later reuse) that FD.
Created attachment 64204 [details] [review] proposed patch this patch adds a new signal that is fired when multifdsink has removed all references to the fd.
* gst/tcp/gstmultifdsink.c: (gst_multi_fd_sink_class_init), (gst_multi_fd_sink_remove_client_link): * gst/tcp/gstmultifdsink.h: Fix race condition in multifdsink that can lead to spurious duplicate clients. this patch adds a new signal that is fired when multifdsink has removed all references to the fd. Fixes #339574. Updated documentation. API: client-fd-removed signal added