]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
try that Kristian
authorMathieu Rene <mrene@avgs.ca>
Mon, 8 Feb 2010 22:26:54 +0000 (22:26 +0000)
committerMathieu Rene <mrene@avgs.ca>
Mon, 8 Feb 2010 22:26:54 +0000 (22:26 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16586 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_limit/mod_limit.c

index a23c5a6b54e6da3fc615ec6b3153a6771d7f3d08..95c8b750a722af5dce267e5b5bcc34e3e9bd924f 100644 (file)
@@ -1161,7 +1161,10 @@ SWITCH_STANDARD_APP(limit_hash_execute_function)
 
        if (do_limit_hash(session, realm, id, max, interval)) {
                switch_core_session_execute_application(session, app, app_arg);
-               limit_hash_release(session, realm, id);
+               /* Only release the resource if we are still in CS_EXECUTE */
+               if (switch_channel_get_state(switch_core_session_get_channel(session)) == CS_EXECUTE) {
+                       limit_hash_release(session, realm, id);                 
+               }
        }
 }