]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Seems the session wasn't coming to the hangup in a locked state.
authorWilliam King <william.king@quentustech.com>
Mon, 13 May 2013 15:28:09 +0000 (08:28 -0700)
committerTravis Cross <tc@traviscross.com>
Fri, 7 Jun 2013 07:26:27 +0000 (07:26 +0000)
src/mod/endpoints/mod_rtmp/mod_rtmp.c

index da3357dee5c82f491810f228db91ff177417e697..6e1c335d43d52b87651953a9d623fa086030a03a 100644 (file)
@@ -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;
 }