mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-08 13:21:51 +00:00
FS-3961 --resolve
This commit is contained in:
@@ -385,6 +385,7 @@ bool Dbh::test_reactive(char *test_sql, char *drop_sql, char *reactive_sql)
|
||||
int Dbh::query_callback(void *pArg, int argc, char **argv, char **cargv)
|
||||
{
|
||||
SWIGLUA_FN *lua_fun = (SWIGLUA_FN *)pArg;
|
||||
int ret = 0;
|
||||
|
||||
lua_pushvalue(lua_fun->L, lua_fun->idx); /* get the lua callback function onto the stack */
|
||||
|
||||
@@ -396,13 +397,13 @@ int Dbh::query_callback(void *pArg, int argc, char **argv, char **cargv)
|
||||
lua_settable(lua_fun->L, -3);
|
||||
}
|
||||
|
||||
docall(lua_fun->L, 1, 1, 1); /* 1 in, 1 out */
|
||||
docall(lua_fun->L, 1, 0, 1);
|
||||
ret = lua_tonumber(lua_fun->L, -1);
|
||||
lua_pop(lua_fun->L, 1);
|
||||
|
||||
if (lua_isnumber(lua_fun->L, -1)) {
|
||||
if (lua_tonumber(lua_fun->L, -1) != 0) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (ret != 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0; /* 0 to continue with next row */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user