From: William King Date: Mon, 13 May 2013 03:23:57 +0000 (-0700) Subject: Seems having a read lock still prevents a write lock to be taken, even if the thread... X-Git-Tag: v1.2.13~171 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ff548f24c2a3a8e174ae808708d2100067b9f59;p=thirdparty%2Ffreeswitch.git Seems having a read lock still prevents a write lock to be taken, even if the thread that is trying to get the write lock currently has the read lock. --- diff --git a/src/mod/endpoints/mod_rtmp/mod_rtmp.c b/src/mod/endpoints/mod_rtmp/mod_rtmp.c index a5d5a1f48e..da3357dee5 100644 --- a/src/mod/endpoints/mod_rtmp/mod_rtmp.c +++ b/src/mod/endpoints/mod_rtmp/mod_rtmp.c @@ -838,6 +838,7 @@ switch_status_t rtmp_session_destroy(rtmp_session_t **rsession) /* At this point we don't know if the session still exists, so request a fresh pointer to it from the core. */ if ( (session = switch_core_session_locate((char *)key)) != NULL ) { + switch_core_session_rwunlock(session); switch_core_session_write_lock(session); channel = switch_core_session_get_channel(session); tech_pvt = switch_core_session_get_private(session);