mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-04 06:36:09 +00:00
mod_lua: cannot assume idx != 0 if cb_fun is provided
This commit is contained in:
parent
87db11afe0
commit
7eae2b629e
@ -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)
|
bool Dbh::query(char *sql, SWIGLUA_FN lua_fun)
|
||||||
{
|
{
|
||||||
if (connected) {
|
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) {
|
if (switch_cache_db_execute_sql_callback(dbh, sql, query_callback, &lua_fun, NULL) == SWITCH_STATUS_SUCCESS) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user