]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_lua: cannot assume idx != 0 if cb_fun is provided
authorLeon de Rooij <leon@toyos.nl>
Fri, 10 Sep 2010 00:58:37 +0000 (02:58 +0200)
committerLeon de Rooij <leon@toyos.nl>
Fri, 10 Sep 2010 00:58:37 +0000 (02:58 +0200)
src/mod/languages/mod_lua/freeswitch_lua.cpp

index 8321f87e2f87366e6e57d8ad17b728d71b82c9e8..d60ae737a8ec66accdd0be3ef57c8ac8b5f8152a 100644 (file)
@@ -367,7 +367,7 @@ int Dbh::query_callback(void *pArg, int argc, char **argv, char **cargv)
 bool Dbh::query(char *sql, SWIGLUA_FN lua_fun)
 {
   if (connected) {
-    if (lua_fun.L && lua_fun.idx != 0) {
+    if (lua_fun.L) {
       if (switch_cache_db_execute_sql_callback(dbh, sql, query_callback, &lua_fun, NULL) == SWITCH_STATUS_SUCCESS) {
         return true;
       }