331 Commits

Author SHA1 Message Date
Andrey Volk
9d5503b71d [Core] Fix database handles infinitely locked in switch_cache_db_database_interface_flush_handles() 2021-10-23 01:21:34 +03:00
Andrey Volk
1607214fd0 [Core] sqldb: Fix wrong lock order in switch_cache_db_release_db_handle() 2021-10-23 01:21:33 +03:00
Andrey Volk
5169e58aca [Core] Fix wrong lock order in switch_user_sql_thread() 2021-10-23 01:21:32 +03:00
Andrey Volk
65afde7b43 [Core] Cleanup sqldb: remove unimplemented io_mutex from switch_cache_db_handle and sql_manager structures 2021-10-23 01:21:32 +03:00
Andrey Volk
0867950a1a [Core] Add check for recovery_skip_announcement_type_applications channel variable, change default behavior to not skip announcement type apps on recovery. 2021-10-23 01:21:20 +03:00
Anthony Minessale
55922ac6d0 [core] fix long sql stmts may be skipped, introduced in 2e88c67c9de5452c7e442d8e7fd35ca0172ad569 in 2009 2021-10-23 01:21:02 +03:00
Anthony Minessale
1b32bda60e [core] reduce waits in sqldb 2021-10-23 01:20:45 +03:00
Timothy Vanderaerden
aae2e08cca
[Core] Databases: Fix duplicate key name 'recovery3'
Fixes: (create index recovery3 on recovery(runtime_uuid)) to database: Duplicate key name 'recovery3'
2020-12-16 18:31:47 +04:00
Andrey Volk
8778cda16d [Core] Wait sql threads to spin up. Fixes module_exists, show_codec commands. 2020-05-07 02:26:22 +04:00
Andrey Volk
cd5d72ac74 [Core] Database interface: fix potential crash in switch_cache_db_database_interface_flush_handles, code cleanup. 2019-12-31 02:29:12 +04:00
Andrey Volk
20295c53ef FS-11827: [Core] Add feature allowing FreeSWITCH to store CORE DB (SQLite) fully in memory (core-db-dsn). 2019-12-31 02:28:20 +04:00
Andrey Volk
4eca43bc62 FS-12048: [Core] Fix leak in SQLite (switch_cache_db_execute_sql2str) when queries return a NULL containing field which may result in high memory consumption. 2019-12-31 00:01:23 +04:00
Andrey Volk
fc61fcfe60 FS-12050: [Core] Fix DataBase Handle (DBH) cache logic 2019-12-30 23:59:46 +04:00
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 b08138d058299db52a96346c0125feb9ef5cde58.
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