<p>Chris Savinovich has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/9511">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">SWP-8578<br>stasis: Improve message type<br><br>Fixes issue where error msg<br>"Use of before/init after destruction"<br>was being printed on disabled messages<br>in dev mode.  With this<br>fix if message is disabled<br>a warning will print.<br><br>Change-Id: Ie0d866d1cbc60c16dbef08bc65e99505c3c1adfa<br>---<br>M main/stasis.c<br>1 file changed, 6 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/11/9511/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/stasis.c b/main/stasis.c</span><br><span>index 190ab14..c76e7f5 100644</span><br><span>--- a/main/stasis.c</span><br><span>+++ b/main/stasis.c</span><br><span>@@ -1199,7 +1199,12 @@</span><br><span> void stasis_log_bad_type_access(const char *name)</span><br><span> {</span><br><span> #ifdef AST_DEVMODE</span><br><span style="color: hsl(0, 100%, 40%);">-      ast_log(LOG_ERROR, "Use of %s() before init/after destruction\n", name);</span><br><span style="color: hsl(120, 100%, 40%);">+    if (stasis_message_type_declined(name)) {</span><br><span style="color: hsl(120, 100%, 40%);">+             ast_log(LOG_WARNING, "Use of %s() while in declined list\n", name);</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+     else {</span><br><span style="color: hsl(120, 100%, 40%);">+                ast_log(LOG_ERROR, "Use of %s() before init/after destruction\n", name);</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span> #endif</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/9511">change 9511</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/9511"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ie0d866d1cbc60c16dbef08bc65e99505c3c1adfa </div>
<div style="display:none"> Gerrit-Change-Number: 9511 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Chris Savinovich <csavinovich@digium.com> </div>