From a30d60b9ad41133afbad9adffea1bf4acc1d8fc3 Mon Sep 17 00:00:00 2001 From: Mathieu Rene Date: Tue, 30 Dec 2008 17:08:00 +0000 Subject: [PATCH] MODAPP-188 Cleanup the limit_realm channel variable so we re-register the state handler if limit is called again git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11003 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_limit/mod_limit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mod/applications/mod_limit/mod_limit.c b/src/mod/applications/mod_limit/mod_limit.c index 95404fe99b..cced864ac5 100644 --- a/src/mod/applications/mod_limit/mod_limit.c +++ b/src/mod/applications/mod_limit/mod_limit.c @@ -285,6 +285,8 @@ static switch_status_t db_state_handler(switch_core_session_t *session) limit_execute_sql(sql, globals.mutex); switch_safe_free(sql); switch_core_event_hook_remove_state_change(session, db_state_handler); + /* Remove limit_realm variable so we register another hook if limit is called again */ + switch_channel_set_variable(channel, "limit_realm", ""); } return SWITCH_STATUS_SUCCESS; }