[vlc-devel] commit: rtp sout: fix another race condition in RTSP (Pierre Ynard )
git version control
git at videolan.org
Thu Jan 28 02:13:47 CET 2010
vlc/vlc-1.0 | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Thu Jan 28 01:59:43 2010 +0100| [5ac77083f50cdd1bed3d8fa7b4c2bf32cd9b2f45] | 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).
(cherry picked from commit 69ec164abb756871a3b7421493d28da1288a6bad)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.0.git/?a=commit;h=5ac77083f50cdd1bed3d8fa7b4c2bf32cd9b2f45
---
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 85b5d78..a7f1900 100644
--- a/modules/stream_out/rtsp.c
+++ b/modules/stream_out/rtsp.c
@@ -127,12 +127,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