From: Kinsey Moore Date: Tue, 7 Oct 2014 20:33:29 +0000 (+0000) Subject: Stasis: Only log errors for non-declined types X-Git-Tag: 14.0.0-beta1~1583 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8bbf1ec1de6a4344ab47a43371b5f6fc594f035;p=thirdparty%2Fasterisk.git Stasis: Only log errors for non-declined types When message type creation is declined via stasis.conf, certain operations log errors assuming that the declined type is being used before initialization or after destruction. These error messages get quite spammy for oft used message types and should not be logged in the first place since the message type is validly NULL. Reported by: Matt DiMeo ........ Merged revisions 424769 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424770 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/stasis.c b/main/stasis.c index d8e0e5afc8..27bf1c9008 100644 --- a/main/stasis.c +++ b/main/stasis.c @@ -1132,7 +1132,9 @@ struct stasis_topic *stasis_topic_pool_get_topic(struct stasis_topic_pool *pool, void stasis_log_bad_type_access(const char *name) { - 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); + } } /*! \brief A multi object blob data structure to carry user event stasis messages */