Revision
14733
Author
mrene
Date
2009-09-02 10:01:09 -0500 (Wed, 02 Sep 2009)

Log Message

mod_limit: set more chan vars in limit_function

Modified Paths

Diff

Modified: freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c (14732 => 14733)


--- freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c	2009-09-02 13:47:59 UTC (rev 14732)
+++ freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c	2009-09-02 15:01:09 UTC (rev 14733)
@@ -860,7 +860,12 @@
 	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: