[Freeswitch-svn] [commit] r8327 - freeswitch/trunk/src/mod/languages/mod_lua

Freeswitch SVN stkn at freeswitch.org
Fri May 9 05:08:33 EDT 2008


Author: stkn
Date: Fri May  9 05:08:32 2008
New Revision: 8327

Modified:
   freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.cpp

Log:
Fix segfault if no arg has been specified, there is still some other issue lurking in the code though

Modified: freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.cpp
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.cpp	(original)
+++ freeswitch/trunk/src/mod/languages/mod_lua/freeswitch_lua.cpp	Fri May  9 05:08:32 2008
@@ -130,7 +130,9 @@
 	
 	if (func) {
 		hangup_func_str = strdup(func);
-		hangup_func_arg = strdup(arg);
+		if (arg) {
+			hangup_func_arg = strdup(arg);
+		}
 		switch_channel_set_private(channel, "CoreSession", this);
 		hook_state = switch_channel_get_state(channel);
 		switch_core_event_hook_add_state_change(session, lua_hanguphook);



More information about the Freeswitch-svn mailing list