]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Include the write lock since we're changing the tech_pvt
authorWilliam King <william.king@quentustech.com>
Sun, 12 May 2013 21:29:14 +0000 (14:29 -0700)
committerTravis Cross <tc@traviscross.com>
Fri, 7 Jun 2013 07:26:26 +0000 (07:26 +0000)
src/mod/endpoints/mod_rtmp/mod_rtmp.c

index 58bbe06fb68c7e293403fbc100c6d2e7970a0bf6..a5d5a1f48e82055c76d5f90a1d9450a5cf1f5b80 100644 (file)
@@ -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_write_lock(session);
                        channel = switch_core_session_get_channel(session);
                        tech_pvt = switch_core_session_get_private(session);
                        if ( tech_pvt && tech_pvt->rtmp_session ) {