From 9e485b505c4882e45bc4e96b9306074723858f4f Mon Sep 17 00:00:00 2001 From: Mathieu Rene Date: Wed, 2 Sep 2009 15:01:09 +0000 Subject: [PATCH] mod_limit: set more chan vars in limit_function git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14733 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_limit/mod_limit.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_limit/mod_limit.c b/src/mod/applications/mod_limit/mod_limit.c index 26018993c9..13960c24cb 100644 --- a/src/mod/applications/mod_limit/mod_limit.c +++ b/src/mod/applications/mod_limit/mod_limit.c @@ -860,7 +860,12 @@ SWITCH_STANDARD_APP(limit_function) limit_execute_sql(sql, NULL); switch_safe_free(sql); - switch_channel_set_variable_printf(channel, "limit_usage", "%d", ++got); + { + const char *susage = switch_core_session_sprintf(session, "%d", ++got); + + switch_channel_set_variable(channel, "limit_usage", susage); + switch_channel_set_variable(channel, switch_core_session_sprintf(session, "limit_usage_%s_%s", realm, id), susage); + } limit_fire_event(realm, id, got, 0, max, 0); done: