Sebastian Kemper
0ac3feb7bc
[mod_gsmopen] Use TIME_T_FMT
...
libcs are implementing changes to fix the year 2038 issue on 32 bit
platforms (see [1]). musl libc already went ahead and implemented it,
starting with musl-1.2.0 (see [2]).
FreeSWITCH already supports time64 libcs since commit
aa71d87528
. But as it turns out, mod_gsmopen
doesn't use TIME_T_FMT (everything else does). And now with a time64 libc
compiling for a 32 bit target, warnings like this appear:
In file included from gsmopen_protocol.cpp:37:
gsmopen.h:121:97: warning: format '%ld' expects argument of type 'long int', but argument 16 has type 'time_t' {aka 'long long int'} [-Wformat=]
121 | #define DEBUGA_GSMOPEN(...) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "rev %s [%p|%-7lx][DEBUG_GSMOPEN %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
gsmopen.h:121:97: note: in definition of macro 'DEBUGA_GSMOPEN'
121 | #define DEBUGA_GSMOPEN(...) switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "rev %s [%p|%-7lx][DEBUG_GSMOPEN %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gsmopen_protocol.cpp:856:104: note: format string is defined here
856 | DEBUGA_GSMOPEN("GSMOPEN_STATE_RING call_incoming_time.tv_sec=%ld\n", GSMOPEN_P_LOG, tech_pvt->call_incoming_time.tv_sec);
| ~~^
| |
| long int
| %lld
This commit adds TIME_T_FMT to mod_gsmopen. All warnings are gone.
[1] https://sourceware.org/glibc/wiki/Y2038ProofnessDesign
[2] https://musl.libc.org/time64.html
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2021-10-22 19:34:01 +02:00
nrensen
ce87856c91
[mod_sofia] Remove redundant sip_from->a_url checks
2021-10-21 19:39:19 +03:00
nrensen
01fe8b36fa
[Core] Fix portability for logging last_digit_time in switch_ivr_play_say.c
2021-10-21 19:36:59 +03:00
Fernando S. Santos
42a6566480
[Configuration] Fix Brazil daylight’s in xml files
2021-10-21 19:35:10 +03:00
Marc Olivier Chouinard
578024ed86
[mod_python3] Replace previously removed deprecated calls
2021-10-21 03:16:39 +03:00
Andrey Volk
f26522f102
Merge pull request #1393 from signalwire/python3
...
[mod_python3] Fix switch module definition preventing mod_python3 from loading.
2021-10-21 01:59:44 +03:00
Andrey Volk
24958e51c2
[mod_python3] Fix switch module definition preventing mod_python3 from loading.
2021-10-20 19:49:51 +03:00
Andrey Volk
b8be418fb8
[Core, mod_commands] Implement memory allocation statistics by adding the "memory" API command.
2021-10-20 17:53:18 +03:00
Andrey Volk
30eaf2c736
Bump sofia-sip library requirement to version 1.13.6
2021-10-19 23:41:27 +03:00
Andrey Volk
3c4a8d33f5
[Packaging] Require specific libsofia-sip-ua0 version when installing FreeSWITCH binary packages.
2021-10-19 23:39:49 +03:00
Andrey Volk
4b1e7ca5f6
Merge pull request #1387 from signalwire/scanbuild7
...
[Testing] Enable scan-build 7 on Drone CI
2021-10-19 23:29:46 +03:00
Andrey Volk
b90a38c8dd
[Testing] Enable scan-build 7 on Drone CI
2021-10-19 21:53:30 +03:00
Andrey Volk
a6f26ee83f
Merge pull request #1390 from signalwire/check_auth
...
[mod_verto] scan-build: fix false-positive Argument with 'nonnull' attribute passed null in check_auth
2021-10-19 21:51:06 +03:00
Andrey Volk
3f958d3724
[mod_verto] scan-build: fix false-positive Argument with 'nonnull' attribute passed null in check_auth
2021-10-19 20:51:56 +03:00
Andrey Volk
b9fdf00f6f
[Core] Fix a false-positive memory leak detected by scan-build in switch_channel_set_variable_strip_quotes_var_check()
2021-10-19 20:45:08 +03:00
Andrey Volk
c58b659f3f
[Core] Add new switch_channel_set_variable_strip_quotes API, cleanup mod_sofia.
2021-10-19 20:45:07 +03:00
Andrey Volk
c1b00d945b
[mod_verto] Fix memory leak and a deadlock on verto endpoint interface in verto_outgoing_channel()
2021-10-19 20:45:06 +03:00
Andrey Volk
36ac71f621
[Core] Fix false-positive memory leak in switch_core_set_variable() detected by scan-build
2021-10-19 20:45:05 +03:00
Andrey Volk
8201f54a2c
[Core] Fix possible memory leak in switch_console_complete()
2021-10-19 20:39:37 +03:00
Andrey Volk
21952f26c1
[freeswitch] Argument with 'nonnull' attribute passed null in reincarnate_protect()
2021-10-19 20:39:37 +03:00
Andrey Volk
58abf91d1d
[Core] Add new switch_core_hash_insert_dup_auto_free() API
2021-10-19 20:39:36 +03:00
Andrey Volk
0b0f5fff65
[mod_sofia] Cleanup sofia_glue_get_host() and make the pool arg be required.
2021-10-19 20:39:35 +03:00
Andrey Volk
f21da2885b
[mod_verto] Add hack.diff to mcast's swig
2021-10-19 20:39:34 +03:00
Andrey Volk
bd7b76bacf
[Core] Add new switch_core_hash_insert_pointer(switch_hash_t *hash, const void *data) API to be able to insert data into a hash with an auto-generated key based on the data pointer. Cleanup switch_loadable_module_process() to not generate hash keys for stored events itself. Add unit-test.
2021-10-19 20:35:12 +03:00
Andrey Volk
e14df00aa6
[Core] scan-build: Argument with 'nonnull' attribute passed null in switch_html_strip()
2021-10-19 20:35:11 +03:00
Andrey Volk
67048377c4
[Core] Fix possible dereference of null pointer in switch_ivr_originate() and switch_ivr_enterprise_originate()
2021-10-19 20:35:10 +03:00
Andrey Volk
4b03a47a7f
[Core] Fix dereference of null pointer in switch_ivr_wait_for_answer()
2021-10-19 20:35:10 +03:00
Dragos Oancea
af095ebb68
[core] scan-build: Dereference of null pointer (loaded from variable 'flags')
2021-10-19 20:35:09 +03:00
Andrey Volk
77c8557aa7
[mod_managed] Fix Windows build
2021-10-19 20:34:45 +03:00
Andrey Volk
dca7940fb9
[Core] scan-build: Use of zero allocated in switch_xml_str2utf8()
2021-10-19 20:30:18 +03:00
Andrey Volk
c35a3bb4db
[Core] scan-build: fix false-positive memory leak in switch_xml_set_attr_d and switch_xml_set_attr_d_buf
2021-10-19 20:30:18 +03:00
Andrey Volk
781180ff48
[Core] scan-build: memory leak in switch_xml_user_cache()
2021-10-19 20:30:17 +03:00
Andrey Volk
e30c62f8ec
[Core] scan-build: Argument with 'nonnull' attribute passed null in switch_xml_internal_dtd()
2021-10-19 20:30:17 +03:00
Andrey Volk
6726922e34
[mod_sofia] scan-build: Dereference of null pointer in sofia_handle_sip_i_bye(), sofia_handle_sip_i_invite() and our_sofia_event_callback()
2021-10-19 20:30:15 +03:00
Andrey Volk
ac1a3dc565
[mod_sofia] scan-build: Argument with 'nonnull' attribute passed null
2021-10-19 20:26:53 +03:00
Andrey Volk
86a075da56
[mod_sofia] scan-build: Fix dereference of null pointer in sofia_outgoing_channel().
2021-10-19 20:26:53 +03:00
Andrey Volk
51ef2f261a
[libvpx] scan-build: Assigned value is garbage or undefined
2021-10-19 20:26:52 +03:00
Andrey Volk
92a55cf85a
[Core] scan-build: Argument with 'nonnull' attribute passed null in switch_loadable_module_load_module_ex()
2021-10-19 20:26:52 +03:00
Andrey Volk
1b048a8a97
[Core, mod_hash] Add two APIs switch_core_hash_insert_alloc_destructor and switch_core_hash_insert_dup_destructor. Code cleanup in mod_hash. Add unit-tests.
2021-10-19 20:26:50 +03:00
Andrey Volk
f92368d2f2
[mod_xml_ldap] Move all memory allocations into the mod's pool so it does not leak on shutdown. Fix leaking xml_ldap_search().
2021-10-19 20:24:10 +03:00
Andrey Volk
9a491fb8f8
[mod_say_pl] Fix potential memory leak in pl_say_ip()
2021-10-19 20:24:09 +03:00
Andrey Volk
4ab8936a0e
[mod_v8] Fix false-positive memory leak detected in process_status_function() by scan-build
2021-10-19 20:24:09 +03:00
Andrey Volk
0e96038d21
[mod_lua] scan-build: Called C++ object pointer is null (Dbh_test_reactive)
2021-10-19 20:24:09 +03:00
Andrey Volk
3abccb4b4f
[mod_kazoo] Fix leaking stream in kz_event_expand_headers_check()
2021-10-19 20:24:06 +03:00
Andrey Volk
ccd2174fb5
[mod_kazoo] Remove wrong usage of switch_safe_strdup() causing leaks in kazoo_tweaks
2021-10-19 20:19:26 +03:00
Andrey Volk
31c10fac22
[mod_kazoo] scan-build: Argument with 'nonnull' attribute passed null in kz_endpoint_outgoing_channel()
2021-10-19 20:19:26 +03:00
Andrey Volk
f82c1f04c5
[iksemel] Fix memory leak
2021-10-19 20:19:25 +03:00
Andrey Volk
7713a2470d
[libdingaling] Fix memory leaks
2021-10-19 20:19:25 +03:00
Andrey Volk
322191a2f4
[mod_dialplan_xml] Fix possible use after free in parse_exten()
2021-10-19 20:19:25 +03:00
Andrey Volk
bb150bc486
[mod_spandsp] scan-build: Argument with 'nonnull' attribute passed null in udptl_rx_packet()
2021-10-19 20:15:59 +03:00