Anton Olofsson [Mon, 29 Jan 2024 16:05:45 +0000 (17:05 +0100)]
[mod_event_socket] Check if listener is running before pushing more logs or events to its queue
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.
wmasilva [Wed, 24 Jan 2024 19:04:32 +0000 (19:04 +0000)]
[Core] softtimer: fix crash in timezones when reloading xml
* 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.
mahald [Wed, 10 Jan 2024 16:01:26 +0000 (17:01 +0100)]
[mod_amqp] Adjusting to Appropriate Log Level for Message
* [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
Visytel [Mon, 8 Jan 2024 09:00:28 +0000 (20:00 +1100)]
[Build-System, ldns] config.h change to not define inline under Windows to avoid clash with Windows winsock2.h inline usage. Use updated ldns tarball on Windows.
* [ldns] config.h change to not define inline under Windows to avoid clash with Windows winsock2.h inline usage
* [Build-System] Use updated ldns tarball on Windows.
tmancill [Fri, 5 Jan 2024 15:42:58 +0000 (07:42 -0800)]
[Docker] Change default freeswitch UID and GID to 499 in docker/master/Dockerfile
On several installs on recent Debian and Ubuntu systems, I have noticed
that GID 999 is already allocated on the system running the container,
making it a minor hassle to share a common freeswitch UID and GID
between the Docker host and the container.
The conflicting group id varies, but is typically either one of the systemd
groups or polkitd, which are dynamically created when those packages are
installed. The behavior stems from the range of system GIDs being
between 100-999 ([see Debian Policy 9.2.2](https://www.debian.org/doc/debian-policy/ch-opersys.html#uid-and-gid-classes))
and the fact that system installation dynamically allocates from this
range. I didn't track down exactly why these daemons are allocating
from the top of the range, since the default behavior of `adduser` and
`addgroup` ([link](https://salsa.debian.org/debian/adduser/-/blob/6c04aa701a2ca09efbff9094ab07e7dae14554fc/adduser#L1255-1269))
is to search from the bottom of the range, and the manpage for
`groupadd` says that it's default is also to use the smallest id,
but perhaps it was to avoid (other) conflicts.
The approach taken in this PR is to default to 499, more in the middle
of the range, which should reduce the chance of conflicting with an
existing system UID and GID. The values are also now exposed as ARGs
and so can be explicitly set during the build with
`--build-arg="FREESWITCH_UID=xxx"` and `--build-arg="FREESWITCH_GID=yyy"`
if desired.
Arun Raghavan [Thu, 12 Oct 2023 19:42:23 +0000 (15:42 -0400)]
[mod_conference] Avoid a race in member->read_impl access
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:
Douglas Vought [Tue, 5 Sep 2023 20:11:01 +0000 (16:11 -0400)]
[contrib/timezone-gen] Fix timezone gen (#2215)
* [contrib/timezone-gen] Move timezone-gen.pl to own folder
* [contrib/timezone-gen] Add fixTzstr
* [contrib/timezone-gen] Add tests and zone data getter
- tests.pl can be used to verify that the generated timezone conf
will produce the correct datetimes by testing them against
what the system's `date` says
- build-zonedata.pl will download the latest tzdb data and build
the posix timezone data files. It only builds what is needed
rather than adding extraneous "right/" and "posix/" timezones.
FreeSWITCH doesn't seem to be able to use the "right/"
timezone files.
- data/ is where the various files needed to generate the
timezones gets stored
Andrey Volk [Tue, 27 Jun 2023 23:51:24 +0000 (02:51 +0300)]
[Core] Add new switch_channel_get_variable_strdup() and switch_channel_get_variable_buf() APIs that avoid allocating channel variables in a session's memory pool.
[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
[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