Fixes issue where error msg
"Use of before/init after destruction"
was being printed on disabled messages
in dev mode. With this
fix if message is disabled
a warning will print.
ASTERISK-25548
Change-Id: Ie0d866d1cbc60c16dbef08bc65e99505c3c1adfa
void stasis_log_bad_type_access(const char *name)
{
#ifdef AST_DEVMODE
- ast_log(LOG_ERROR, "Use of %s() before init/after destruction\n", name);
+ if (!stasis_message_type_declined(name)) {
+ ast_log(LOG_ERROR, "Use of %s() before init/after destruction\n", name);
+ }
#endif
}