Andrey Volk
c155ea7008
[Core] Fix implicit conversion from enumeration type 'switch_odbc_status_t' to different enumeration type 'switch_status_t'.
2023-12-14 13:44:22 +03:00
Jakub Karolczyk
bb9afcb388
[core] Coverity fixes
...
* [core] Coverity 1518099, 1518097, 1518098 (Unchecked return value from library)
* [core] Coverity 1468551 Unchecked return value
* [core] Coverity 1468293 Unchecked return value
* [core] Coverity 1468274 Explicit null dereferenced
* [core] Coverity 1395588 Unchecked return value
* [core] Coverity 1395515 Logically dead code
* [core] Coverity 1364984 Result is not floating-point
* [core] Coverity 1395554, 1468440 Dereference before null check
* [core] Coverity 1024487 Dereference after null check
* [core] Coverity 1024872 Unchecked return value
* [core] Coverity 1025822 Unchecked return value
* [core] Coverity 1025823 Unchecked return value
* [core] Coverity 1087637, 1346467, 1087638 Unchecked return value
* [core] Coverity 1107607 Unchecked return value
* [core] Coverity 1210777 Unchecked return value
* [core] Coverity 1227670 Dereference before null check
* [core] Coverity 1024551 Logically dead code
* [core] Coverity 1024560 Logically dead code
* [core] Coverity 1024664 Operands don't affect result
* [core] Coverity 1364957 Dereference after null check
* [core] Coverity 1395572 Logically dead code
* [core] Coverity 1412459 Unchecked return value
* [core] Coverity 1412490 Unchecked return value
* [core] Coverity 1395515/2 Logically dead code
* [core] Coverity cleanup
2023-09-08 20:17:57 +03:00
Jakub Karolczyk
49c1c35982
[core] Coverity fixes
...
* [core] Coverity CID 1468218 (Resource leak)
* [core] Coverity CID 1468214 (Resource leak)
* [core] Coverity CID 1294472 (Resource leak)
* [core] Coverity CID 1294470 (Resource leak)
* [core] Coverity CID 1500361 (Resource leak)
* [core] Coverity CID 1500308 (Resource leak)
* [core] Coverity CID 1500278 (Resource leak)
---------
Co-authored-by: Andrey Volk <andywolk@gmail.com>
2023-04-01 00:07:59 +03:00
Andrey Volk
56b6e954cf
[Core] Fix dead nested assignments
2022-08-09 23:29:31 +03:00
Andrey Volk
94337b33fb
[Core] Fix database handles infinitely locked in switch_cache_db_database_interface_flush_handles()
2021-10-23 22:00:44 +03:00
Andrey Volk
58f7c2d64e
[Core] sqldb: Fix wrong lock order in switch_cache_db_release_db_handle()
2021-10-23 22:00:44 +03:00
Andrey Volk
69b8c080f6
[Core] Fix wrong lock order in switch_user_sql_thread()
2021-10-23 22:00:43 +03:00
Andrey Volk
79127d94e5
[Core] Cleanup sqldb: remove unimplemented io_mutex from switch_cache_db_handle and sql_manager structures
2021-10-23 22:00:43 +03:00
Andrey Volk
a162cf86e8
[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 22:00:37 +03:00
Anthony Minessale
3ce9a9a393
[core] fix long sql stmts may be skipped, introduced in 2e88c67c9d
in 2009
2021-10-23 22:00:28 +03:00
Anthony Minessale
6e68da4930
[core] reduce waits in sqldb
2021-10-23 22:00:14 +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 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