This fixes a possibility for MAX_MISSED to be exceeded if more logs are
attempted to be pushed to the listener's queue after running kill_listener but
before the listener thread gets CPU time and removes itself.
On a heavily loaded system with a lot of logs in the event dispatch queue
these excessive logs may prove fatal since socket_logger itself will produce
logs about the full queue, resulting in a circular situation of never-ending logs.
The same logic was applied to event_handler after finding the same behaviour
mentioned in signalwire/freeswitch#2143.
* switch_time: fix segfault null TIMEZONES_LIST.hash when reloading xml
* Unbind before destroying TIMEZONES_LIST.hash. Protect TIMEZONES_LIST.hash with a mutex that's allocated in core's global runtime.memory_pool so the mutex does not die on softtimer shutdown.
---------
Co-authored-by: Andrey Volk <andywolk@gmail.com>
* [mod_amqp] Adjusting to Appropriate Log Level for Message
Refined Logging Level for FreeSWITCH's mod_amqp: The logging level for the AMQP module in FreeSWITCH has been updated from 'warning' to 'debug'. This adjustment ensures a more suitable level for the log message and eliminates any potential impact on production environments. Previously, the 'warning' level would lead to unnecessary log entries for each individual message, although there was no actual warning condition. This change improves logging efficiency and appropriateness for mod_amqp's operations within FreeSWITCH.
* [MOD_AMQP] Change LogLevel to DEBUG1 as it is more appropriate for this message
The conference output loop accesses the member's read_impl while
resampling. The output loop also spawns off the input loop thread, which
is where the member->read_impl is actually initialised. This results in
an uncommon race where the output loop sometimes gets an uninitialised
member->read_impl and bails with logs something like this:
2023-10-12 18:19:01.436844 [DEBUG] conference_loop.c:1340 Setup timer soft success interval: 20 samples: 960 from codec L16
2023-10-12 18:19:01.436844 [DEBUG] conference_loop.c:1497 Outbound conference channel answered, setting CFLAG_ANSWERED
2023-10-12 18:19:01.436844 [NOTICE] switch_core_media.c:15852 Activating write resampler
2023-10-12 18:19:01.436844 [DEBUG] switch_core_media.c:16097 Engaging Write Buffer at 1920 bytes to accommodate 0->1920
2023-10-12 18:19:01.436844 [ERR] switch_core_media.c:16112 Write Buffer 0 bytes Failed!
As a solution, we initialise the member->read_impl even before we start
up the input loop, so that this race can never happen.
* [Core] Coverity: 1500270 Use of 32-bit time_t
* [Core] Coverity: 1500229 Use of 32-bit time_t
* [Core] Coverity: 1500235 Use of 32-bit time_t
* [Core] Coverity: 1500244 Use of 32-bit time_t
* [Core] Coverity: 1500250 Use of 32-bit time_t
* [Core] Coverity: 1500245 Use of 32-bit time_t
* [Core] Coverity: 1500255 Use of 32-bit time_t
* [Core] Coverity: 1500370 Use of 32-bit time_t
* Cleanup
[Core, mod_cidlookup, mod_curl, mod_httapi, mod_http_cache, mod_kazoo, mod_shout] Add new switch_curl_mime APIs replacing switch_curl_process_form_post_params() and make code be compatible with libcurl>=7.87.0