mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-11 13:54:14 +00:00
Fix segfault if no arg has been specified, there is still some other issue lurking in the code though
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8327 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
f080f3a454
commit
ba0ef07f89
1 file changed
+3
-1
@@ -130,7 +130,9 @@ void Session::setHangupHook(char *func, char *arg) {
|
||||
|
||||
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);
|
||||
|
||||
Reference in new issue
Block a user