<p>N A has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18053">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">app_voicemail: Emit warning if asking for nonexistent mailbox.<br><br>Currently, if VoiceMailMain is called with a mailbox, if that<br>mailbox doesn't exist, then the application silently falls back<br>to prompting the user for the mailbox, as if no arguments were<br>provided.<br><br>However, if a specific mailbox is requested and it doesn't exist,<br>then no warning at all is emitted.<br><br>This fixes this behavior to now warn if a specifically<br>requested mailbox could not be accessed, before falling back to<br>prompting the user for the correct mailbox.<br><br>ASTERISK-29920 #close<br><br>Change-Id: Ib4093b88cd661a2cabc5d685777d4e2f0ebd20a4<br>---<br>M apps/app_voicemail.c<br>1 file changed, 9 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/53/18053/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c</span><br><span>index 32d867d..336c781 100644</span><br><span>--- a/apps/app_voicemail.c</span><br><span>+++ b/apps/app_voicemail.c</span><br><span>@@ -11617,10 +11617,16 @@</span><br><span> else</span><br><span> ast_copy_string(vms.username, args.argv0, sizeof(vms.username));</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (!ast_strlen_zero(vms.username) && (vmu = find_user(&vmus, context ,vms.username)))</span><br><span style="color: hsl(0, 100%, 40%);">- skipuser++;</span><br><span style="color: hsl(0, 100%, 40%);">- else</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!ast_strlen_zero(vms.username)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if ((vmu = find_user(&vmus, context ,vms.username))) {</span><br><span style="color: hsl(120, 100%, 40%);">+ skipuser++;</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_WARNING, "Mailbox '%s%s%s' doesn't exist\n", vms.username, context ? "@": "", context ? context : "");</span><br><span style="color: hsl(120, 100%, 40%);">+ valid = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span> valid = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span> }</span><br><span> </span><br><span> if (!valid)</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18053">change 18053</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/+/18053"/><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: Ib4093b88cd661a2cabc5d685777d4e2f0ebd20a4 </div>
<div style="display:none"> Gerrit-Change-Number: 18053 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>