ast_sendtext_data() would create an incorrect T.140 text frame which
length include the null terminator byte. It causes ultimately RTP
packets to be send with this trailing 0. The proposed fix just set the
correct length to the text frame
ASTERISK-28089
Reported by: Emmanuel BUU
Tested by: Emmanuel BUU
Change-Id: I7ab1b9ed1e21683b2b667ea0a59d9aba3c77dd96
This has no effect on startup since AST_MODULE_LOAD_FAILURE aborts
startup, but it's possible for this code to be returned on manual load
of a module after startup.
It is an error for a module to not have a load callback but this is not
a fatal system error. In this case flag the module as declined, return
AST_MODULE_LOAD_FAILURE only if a required module is broken.
Expand doxygen documentation for AST_MODULE_LOAD_*.
Change-Id: I3c030bb917f6e5a0dfd9d91491a4661b348cabf8
* Make load_module() cleanup if it failed to setup the module.
* Make unload_module() always return 0. It is silly to fail unloading if
the hook function we try to unregister was not even registered.
Change-Id: I280fc6e8ba2a7ee2588ca01d870eebaf74b4ffe6
If codec_speex fails to register a translator it would cause Asterisk to
exit instead of continue as a DECLINED module.
* Make unload_module() always return 0. It is silly to fail unloading if
any translators we try to unregister were not even registered.
Change-Id: Ia262591f68333dad17673ba7104d11c88096f51a
Fix redirection to /dev/null of cleanup commands. The '2' was being
interpreted as part of the command instead of part of the redirect.
Change-Id: I2e3a591b165e0288c4b82b9ef475fdfd5392a90a
I think this module is so screwed up that it doesn't work anymore. Even
with these attempts to fix things it still won't gracefully shut down.
The module refs will not go to zero to allow unloading the module.
* Fix module ref counting dealing with the SMDI interface object. There
were several off-nominal paths that unbalanced the module ref count. Also
the destructor freed the ao2 object itself which is bad. Made the
smdi_read thread not hold its own ref to the SMDI interface object so when
all refs go away the destructor will stop the listener thread.
* Fixed the smdi_load() return code of 1 concerning the number of
listeners. The test was inverted.
Change-Id: Ic288db51b58e395d6a2fc3847f77176c16988784
This module is an optional dependency of a couple of other modules. If it
declines to load, it then forces other modules that can optionally use
this module to also decline.
* Made use the default configuration if the config file does not exist and
simplified some of the logic.
Change-Id: Ib93191f1fe28c0dd9ebe3d84c7762b32f83c4eb9
There is currently no way to indicate to Asterisk that TLS certificates
and/or keys have been updated other than by modifying http.conf or
restarting Asterisk.
There is already code in main/tcptls.c that determines if a reload is
actually necessary based on the hashes of the certicate and dependent
files, so this change merely gives us a way to request a reload without
explicitly modifying http.conf.
Change-Id: Ie795420dcc7eb3d91336820688a29adbcc321276
This module is an optional dependency of many modules. If it declines to
load it then forces other modules that can optionally use this module to
also decline.
* Made use default configuration if there is a config error or the config
file does not exist.
Change-Id: If1068a582ec54ab7fb437265cb5370a97a825737
* ACO options
* Indications
* Module loader ref_debug object
* Media index info and variants
* xmldoc items
These allocation locations were identified using reflocks.py on the
master branch.
Change-Id: Ie999b9941760be3d1946cdb6e30cb85fd97504d8
When a module reload fails we never set AST_MODULE_RELOAD_ERROR. This
caused reload failures to incorrectly report 'No module found'.
Change-Id: I5f3953e0f7d135e53ec797f24c97ee3f73f232e7
* Display list of unavailable dependencies when they cause another
module to fail loading.
* When a module declines to load find all modules which depend on it so
they can be declined and listed together.
* Prevent retry of declined modules during startup.
* When a module fails to dlopen try loading it with RTLD_LAZY so we can
attempt to display the list of missing dependencies.
These changes are meant to reduce logger spam that is caused when a
module has many dependencies and declines to load. This also fixes some
error paths which failed to recognize required modules.
Module load/start errors are delayed until the end of loader startup.
Change-Id: I046052c71331c556c09d39f47a3b92975f3e1758
If a channel creates an AST_TEXT_FRAME with datalen == 0, the ast_frdup()
and ast_frisolate() functions could create a clone frame with an invalid
data.ptr which would cause a crash. The proposed fix is to make sure that
for such empty text frames, ast_frdup() and ast_frisolate() return cloned
text frames with a valid data.ptr.
ASTERISK-28076
Reported by: Emmanuel BUU
Tested by: Emmanuel BUU
Change-Id: Ib882dd028598f13c4c233edbfdd7e54ad44a68e9
When DEBUG_THREADS is enabled we can know if the astobj2 mutex / rwlock
was ever used, so it can be recorded in the REF_DEBUG destructor entry.
Create contrib/scripts/reflocks.py to process locking used by
allocator. This can be used to identify places where
AO2_ALLOC_OPT_LOCK_NOLOCK should be used to reduce memory usage.
Change-Id: I2e3cd23336a97df2692b545f548fd79b14b53bf4
Declining the queue_member_status_type stasis message in stasis.conf
causes these messages to leak json objects.
* Add missing ast_json_unref() if the type is NULL in
queue_publish_member_blob().
ASTERISK-28084
Change-Id: I691ecf49bd1f7d9c29182e1eee8c4bb7103be9fc