[vlc-devel] commit: rtp sout: fix another race condition in RTSP (Pierre Ynard )
git version control
git at videolan.org
Thu Jan 28 02:05:34 CET 2010
vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Thu Jan 28 01:59:43 2010 +0100| [69ec164abb756871a3b7421493d28da1288a6bad] | committer: Pierre Ynard
rtp sout: fix another race condition in RTSP
When RTSP is shut down, the server destroys sessions (with no locking)
while clients are still able to concurrently access them, potentially
leading to a crash. Make sure we unregister the RTSP URL before
cleaning up (then indeed no locking is needed).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=69ec164abb756871a3b7421493d28da1288a6bad
---
modules/stream_out/rtsp.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/stream_out/rtsp.c b/modules/stream_out/rtsp.c
index 1f58f75..0d103fa 100644
--- a/modules/stream_out/rtsp.c
+++ b/modules/stream_out/rtsp.c
@@ -122,12 +122,12 @@ error:
void RtspUnsetup( rtsp_stream_t *rtsp )
{
- while( rtsp->sessionc > 0 )
- RtspClientDel( rtsp, rtsp->sessionv[0] );
-
if( rtsp->url )
httpd_UrlDelete( rtsp->url );
+ while( rtsp->sessionc > 0 )
+ RtspClientDel( rtsp, rtsp->sessionv[0] );
+
if( rtsp->host )
httpd_HostDelete( rtsp->host );
More information about the vlc-devel
mailing list