From: Chris-Savinovich Date: Wed, 18 Jul 2018 16:34:04 +0000 (-0400) Subject: stasis: Improve message type "Use of before/init after destruction" X-Git-Tag: 13.23.0-rc1~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae5ba776ae63b6fa2e3a702937f5b9a1731388a1;p=thirdparty%2Fasterisk.git stasis: Improve message type "Use of before/init after destruction" 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 --- diff --git a/main/stasis.c b/main/stasis.c index d399a82e9f..a668e82eba 100644 --- a/main/stasis.c +++ b/main/stasis.c @@ -1201,7 +1201,9 @@ struct stasis_topic *stasis_topic_pool_get_topic(struct stasis_topic_pool *pool, 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 }