<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13801">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_musiconhold: Avoid spurious warning when 'format' is the empty string<br><br>The change to res_config_odbc that allowed empty strings to be<br>returned to realtime consumers¹ causes a warning to be emitted when<br>loading MoH classes. So we need to treat an empty 'format' as if it<br>was not specified to avoid the warning.<br><br>ASTERISK-28735 #close<br>Reported by: Ross Beer<br><br>[1] https://gerrit.asterisk.org/c/asterisk/+/13722<br><br>Change-Id: I9a271d721e1a0973e80ebe7d75b46a0d8fa0e5a5<br>---<br>M res/res_musiconhold.c<br>1 file changed, 1 insertion(+), 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/01/13801/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c</span><br><span>index 1bacb11..dd9b8a5 100644</span><br><span>--- a/res/res_musiconhold.c</span><br><span>+++ b/res/res_musiconhold.c</span><br><span>@@ -1119,7 +1119,7 @@</span><br><span> } else if (!strcasecmp(var->value, "randstart")) {</span><br><span> ast_set_flag(mohclass, MOH_RANDSTART);</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- } else if (!strcasecmp(var->name, "format")) {</span><br><span style="color: hsl(120, 100%, 40%);">+ } else if (!strcasecmp(var->name, "format") && !ast_strlen_zero(var->value)) {</span><br><span> ao2_cleanup(mohclass->format);</span><br><span> mohclass->format = ast_format_cache_get(var->value);</span><br><span> if (!mohclass->format) {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13801">change 13801</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/c/asterisk/+/13801"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I9a271d721e1a0973e80ebe7d75b46a0d8fa0e5a5 </div>
<div style="display:none"> Gerrit-Change-Number: 13801 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>