summaryrefslogtreecommitdiff
path: root/main/stasis.c
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2014-10-07 20:32:11 +0000
committerKinsey Moore <kmoore@digium.com>2014-10-07 20:32:11 +0000
commit57a5e2ebee0e18ecf8ae53623b869f46b9bac171 (patch)
treed02d4c124dcc6ed149ae5f783b43b635e87039ea /main/stasis.c
parent673c2febba1e5a47c0efe2c731a6daca5ffcde85 (diff)
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@424769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/stasis.c')
-rw-r--r--main/stasis.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/stasis.c b/main/stasis.c
index d8e0e5afc..27bf1c900 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 */