mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-11 22:04:13 +00:00
8e4423f126b9476123c6fa8c41c5f8ebfe1d0cb5
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
…
Description
FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.
BSD-3-Clause, ISC
189 MiB
0 Stars
1 Watchers
0 Forks
Languages
C
65.1%
C++
21%
JavaScript
4.7%
Assembly
1.9%
Makefile
1.1%
Other
5.5%