From: William King Date: Mon, 13 May 2013 15:28:09 +0000 (-0700) Subject: Seems the session wasn't coming to the hangup in a locked state. X-Git-Tag: v1.2.13~170 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce9bf959e94841f0c2574eed4e850a3b8f66d987;p=thirdparty%2Ffreeswitch.git Seems the session wasn't coming to the hangup in a locked state. --- diff --git a/src/mod/endpoints/mod_rtmp/mod_rtmp.c b/src/mod/endpoints/mod_rtmp/mod_rtmp.c index da3357dee5..6e1c335d43 100644 --- a/src/mod/endpoints/mod_rtmp/mod_rtmp.c +++ b/src/mod/endpoints/mod_rtmp/mod_rtmp.c @@ -250,6 +250,7 @@ switch_status_t rtmp_on_hangup(switch_core_session_t *session) rtmp_private_t *tech_pvt = NULL; rtmp_session_t *rsession = NULL; + switch_core_session_write_lock(session); channel = switch_core_session_get_channel(session); assert(channel != NULL); @@ -299,6 +300,7 @@ switch_status_t rtmp_on_hangup(switch_core_session_t *session) switch_thread_rwlock_unlock(rsession->rwlock); done: + switch_core_session_rwunlock(session); return SWITCH_STATUS_SUCCESS; }