]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
dont eval blank string
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 16 Aug 2008 15:56:29 +0000 (15:56 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 16 Aug 2008 15:56:29 +0000 (15:56 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9311 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/languages/mod_lua/freeswitch_lua.cpp

index 44238757be43c4d698f97c8eaa11f9a72e0830ec..e30eb8b6975e6cbb3055aab9c8d793e5e9a611c8 100644 (file)
@@ -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++;
                        }