From c052a998370c4821d04952cbea850332ae9f168d Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sat, 16 Aug 2008 15:56:29 +0000 Subject: [PATCH] dont eval blank string git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9311 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/languages/mod_lua/freeswitch_lua.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/languages/mod_lua/freeswitch_lua.cpp b/src/mod/languages/mod_lua/freeswitch_lua.cpp index 44238757be..e30eb8b697 100644 --- a/src/mod/languages/mod_lua/freeswitch_lua.cpp +++ b/src/mod/languages/mod_lua/freeswitch_lua.cpp @@ -225,7 +225,7 @@ switch_status_t Session::run_dtmf_callback(void *input, switch_input_type_t ityp lua_pushnumber(L, dtmf->duration); lua_rawset(L, -3); - if (cb_arg) { + if (!switch_strlen_zero(cb_arg)) { lua_getfield(L, LUA_GLOBALSINDEX, (char *) cb_arg); arg_count++; } @@ -249,7 +249,7 @@ switch_status_t Session::run_dtmf_callback(void *input, switch_input_type_t ityp mod_lua_conjure_event(L, event, "__Input_Event__", 1); lua_getfield(L, LUA_GLOBALSINDEX, "__Input_Event__"); - if (cb_arg) { + if (!switch_strlen_zero(cb_arg)) { lua_getfield(L, LUA_GLOBALSINDEX, (char *) cb_arg); arg_count++; }