Commit Graph

318 Commits

Author SHA1 Message Date
Andrey Volk a124937f0c [Core] Fix wrong sqldb initialization order causing crash on load. 2019-12-04 19:32:46 +04:00
Andrey Volk 9520f8e111 FS-11991: [Core] Fix bug in the database module interface preventing tables from being created when no drop_sql 2019-08-10 20:40:52 +04:00
Andrey Volk f74036cd1c FS-11989: [Core] Fix database module interface not returning statuses of some operations. 2019-08-10 03:05:41 +04:00
Andrey Volk 4a2812aaf5 FS-11727: [mod_mariadb] Add MariaDB (MySQL) support 2019-07-23 20:07:16 +04:00
Andrey Volk ccc4ae282a FS-11880: [Core,mod_pgsql] Remove native PostgreSQL support from the core, add mod_pgsql database module. 2019-07-18 00:20:50 +04:00
Seven Du 5c78fc6fdf FS-11670 add db name and type to sql error logs 2019-07-17 19:50:31 +04:00
Andrey Volk a7477ed0e2 FS-11911: Fix build on Debian Buster 2019-07-15 22:23:25 +04:00
Mike Jerris 2abd5705dc FS-10801: [core] fix typo in core db interface 2019-07-15 22:19:27 +04:00
Mike Jerris 5febf075f7 FS-10801: [core] fix typo in core db interface 2019-07-15 22:19:12 +04:00
Andrey Volk 7fc9eafa74 FS-11727: [core] Add SWITCH_DATABASE_FLAG_ROW_SIZE_LIMIT for databases unable to create wide tables. 2019-07-15 22:18:30 +04:00
Andrey Volk 07e0d4f90c FS-10801: [core] Add a database interface to the FreeSWITCH Core. 2019-07-15 22:18:19 +04:00
Andrey Volk 359287ffe2 FS-11902: [Core] Remove duplicate database indexes. 2019-06-29 03:17:41 +04:00
Andrey Volk bb470b2507 FS-11866: [Core] FreeSWITCH Core no longer loads if database fails to connect. 2019-05-29 23:07:14 +04:00
Piotr Gregor e554d48ef6 FS-11202 Add sanity check
Check value of sanity while looping over
switch_cache_db_get_db_handle_dsn() in switch_user_sql_thread.
2018-07-24 07:21:54 +00:00
Sergey Safarov df1ab07ca4 FS-9924: Removed extra space in source files 2017-02-09 23:59:49 -05:00
Aron Podrigal 9619bff685 FS-9758: switch_sql_queue_manager_destroy() avoid null pointer deref
If passed in *qmp is a null pointer return `SWITCH_STATUS_NOOP`
2016-11-21 23:08:16 +00:00
Mike Jerris e1b3ee1efd FS-9652: improve sql sanitization 2016-11-11 11:27:35 -06:00
Spencer Thomason 800655f774 FS-9184: Allow show calls to be filtered by accountcode 2016-05-20 11:32:24 -07:00
Ken Rice e18c12b609 FS-8953 [core] white space clean up. 2016-03-17 08:55:00 -05:00
Bradley Jokinen 99f5234fef FS-7854 Add task_runtime to tasks table in core database
This patch adds the task_runtime column to the tasks table in the core
database. The BIGINT type is used for this column because a 64-bit integer
is used to store task runtimes within the scheduler.
2015-07-20 15:06:46 -05:00
Emets Vladimir 38a35c26d8 FS-7339: create views basic_calls and detailed_calls after create table calls 2015-03-03 23:45:15 +05:00
E. Schmidbauer 01dcb74f33 FS-7187 add switch_cache_db_create_schema() to test for SCF_AUTO_SCHEMAS flag 2015-01-22 15:41:22 -05:00
Seven Du 07030c63f0 fix compiler warning on unmatched return type 2014-11-12 13:31:30 +08:00
Peter Wu 8e4423f126 Document Dbh.test_reactive, return saner values
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
2014-09-15 15:39:08 +02:00
Travis Cross 054c645818 Show initial channel values with `show channels`
Store some initial details about the channel separately so we can
preserve them across e.g. transfers and display them with show
channels.

With this commit, we store the original caller ID (name and number)
and IP address, and the call destination, dialplan, and context.

FS-4296 --resolve

Thanks-to: Mariusz Czułada <manieq.net@gmail.com>
2014-05-24 08:42:54 +00:00
Travis Cross 0274991732 Revert commit that breaks build on gcc-4.8
Revert "FS-4296 --resolve initial calling/called nums in 'show channels'"

This reverts commit b08138d058.
2014-05-24 07:18:48 +00:00
Ken Rice b08138d058 FS-4296 --resolve initial calling/called nums in 'show channels'
Store initial caller and destination numbers in 'channels' table,
so `show channels` can display it.

Patch provided by Mariusz Czułada <manieq.net@gmail.com>
2014-05-23 15:03:47 -05:00
Anthony Minessale 042b162bc4 back off locking contention on sql queues when they are nearly full to allow the system to recover from an attack 2014-05-23 23:13:38 +05:00
William King 5f3e98beb4 Fix a use after free in a 'theoretical' case in switch_cache_db_persistant_execute_trans_full where the pre_trans_execute statement fails, but SQLSetAutoCommitAttr succeeds 2014-04-30 14:37:17 -07:00
Anthony Minessale a608550800 FS-5832 regression.... After this change the sticky completes were deleting. This should correct it 2014-04-06 03:51:36 +05:00
Eliot Gable 5b1ab59f00 Add error handling to sql queue manager callback functionality and fix spelling. 2014-03-14 15:54:05 +00:00
Anthony Minessale efef505e26 add switch_sql_queue_manager_pause and switch_sql_queue_manager_resume 2014-03-12 11:42:37 -05:00
Anthony Minessale 98c2a3b992 don't nuke tcp and tls reg on restart 2014-03-11 16:25:51 -05:00
Ken Rice 6e7d5d0897 update copyright header for 2014 2014-02-12 12:08:56 -06:00
Peter Olsson 084e245085 Lots of trivial tweaks to minimize compiler warnings, especially on 64-bit platform: Added missing type casts, changed types, added missing NULL checks. 2014-01-22 22:30:23 +01:00
Jeff Lenk f03e9fe8af FS-5585 --resolve 2013-12-24 11:37:09 -06:00
Seven Du f9a532900b add total used count for debug 2013-11-17 21:27:39 +08:00
Anthony Minessale 73bbd83dc4 FS-5900 --resolve wow, that's a good find 2013-10-22 09:54:58 -05:00
Anthony Minessale 4a172402d2 some refactoring and plumbing for 1.4 2013-10-16 02:24:32 +05:00
Nathan Neulinger 912e05d86c FS-5832 additional hostname updates for failover behavior 2013-10-02 12:24:34 -05:00
Anthony Minessale b518b09f7c FS-5832 --resolve this should dedicate the interfaces per box assuming the hostnames on the box are distinct and the switchname param is set to be identical on the 2 boxes allowing the hostname as the sep key for the box-specific tables, the aliases table is still shared and sticky aliases should be used to keep them in tact. 2013-10-01 09:46:28 -05:00
Anthony Minessale 80f9168226 FS-5664 --resolve 2013-08-03 18:49:55 +05:00
Nathan Neulinger 32adc789f6 make noexpandtab explicit in all vim modelines other than xml files 2013-06-25 11:50:17 -05:00
Travis Cross 3c8db7c715 Avoid using memory after we free it
Without setting errmsg to NULL here, we'll try to print this freed
value again below if another error doesn't intercede.
2013-05-28 05:28:19 +00:00
Anthony Minessale 30c27efb62 move log message to avoid logging null 2013-05-09 14:34:39 -05:00
Anthony Minessale 8eef28ab24 FS-5313 --resolve 2013-04-17 17:34:05 -05:00
Anthony Minessale 863fbd2e35 FS-5313 2013-04-17 14:57:11 -05:00
Anthony Minessale be248879ae FS-5305 --resolve 2013-04-15 14:47:50 -05:00
Anthony Minessale ed4c177177 FS-5291 --resolve 2013-04-10 10:13:43 -05:00
Anthony Minessale 8523f22578 fix shutdown race in queue managers 2013-03-14 13:35:42 -05:00