When running "make swigclean" in mod_lua directory and trying to compile
mod_lua afterward, the build fails because the target mod_lua_wrap.cpp
doesn't exist. The target is wrongly called lua_wrap instead.
making all mod_lua
make[7]: Entering directory '/path/to/freeswitch-1.6.17/src/mod/languages/mod_lua'
CXX mod_lua_la-mod_lua.lo
CXX mod_lua_la-freeswitch_lua.lo
make[7]: *** No rule to make target 'mod_lua_wrap.cpp', needed by 'mod_lua_la-mod_lua_wrap.lo'. Stop.
Fix this by renaming lua_wrap to mod_lua_wrap.cpp.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Various functions exposed via lua do not check their parameters for null
causing freeswitch to segfault.
This change adds checking for null parameters and returns an error
instead of segfaulting.
The new C compiler breaks a lot of things. snprintf and timespec now exist, and redefining causes an error.
Many more things are warnings, so warnings-as-errors will fail - remove it from some projects for now.
V8: don't pass VS version to build batch file.
mod_sofia: Config has too-long if/elseif chain. Break this up to avoid "parser stack overflow; program too complex".
Add mod_conference.h to project and dir to includes.
In the FreeSWITCH core, the return value of switch_case_db_test_reactive
is ignored, but it is usable in LUA modules (and other bindings via
SWIG). The LUA API example[1] shows how to check the return value, but
that example miserably fails if the database did not exist before.
Changes:
- Document the expected behavior of the test_reactive function.
- Assert that test_sql and sql_reactive are both given. If either
query is not given, the caller is using the wrong API.
- When SCF_AUTO_SCHEMAS is cleared, use the return value of the
test_sql execution. Does anybody use this? Why not remove it?
- Do not unconditionally return SWITCH_FALSE when test_sql fails,
instead allow it to become SWITCH_TRUE when reactive_sql passes.
- Remove the unnecessary test_sql check for SCDB_TYPE_CORE_DB
(this is now enforced through an assert check). (+reindent)
- Clarify the error message of drop_sql, prepending "Ignoring" to
the "SQL ERR" message.
- LUA: Do not print "DBH NOT Connected" if the query fails. This was
the initial source of confusion.
[1]: https://confluence.freeswitch.org/display/FREESWITCH/Lua+API+Reference