<p>Richard Mudgett has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8464">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">voicemail: Fixed wrong voicemail message count<br><br>Fixed wrong voicemail mailbox reference for Action: VoicemailUsersList.<br><br>ASTERISK-27703<br><br>Change-Id: I99bfec14bd4ae475b0fa1fac5a7992f3e2e8d64a<br>---<br>M apps/app_voicemail.c<br>1 file changed, 22 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/64/8464/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c<br>index d22a839..ce06850 100644<br>--- a/apps/app_voicemail.c<br>+++ b/apps/app_voicemail.c<br>@@ -13282,11 +13282,30 @@<br>     astman_send_listack(s, m, "Voicemail user list will follow", "start");<br> <br>         AST_LIST_TRAVERSE(&users, vmu, list) {<br>-           char dirname[256];<br>            int new, old;<br>-                inboxcount(vmu->mailbox, &new, &old);<br>+             int ret;<br>+             char *mailbox;<br> <br>-            make_dir(dirname, sizeof(dirname), vmu->context, vmu->mailbox, "INBOX");<br>+             /* create mailbox string */<br>+          if (!ast_strlen_zero(vmu->context)) {<br>+                     ret = ast_asprintf(&mailbox, "%s@%s", vmu->mailbox, vmu->context);<br>+               } else {<br>+                     ret = ast_asprintf(&mailbox, "%s", vmu->mailbox);<br>+           }<br>+            if (ret == -1) {<br>+                     ast_log(LOG_ERROR, "Could not create mailbox string. err[%s]\n", strerror(errno));<br>+                 continue;<br>+            }<br>+<br>+         /* get mailbox count */<br>+              ret = inboxcount(mailbox, &new, &old);<br>+               ast_free(mailbox);<br>+           if (ret == -1) {<br>+                     ast_log(LOG_ERROR, "Could not get mailbox count. username[%s], context[%s]\n",<br>+                             vmu->mailbox ?: "", vmu->context ?: "");<br>+                   continue;<br>+            }<br>+<br>          astman_append(s,<br>                      "Event: VoicemailUserEntry\r\n"<br>                     "%s"<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8464">change 8464</a>. To unsubscribe, 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/8464"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15.3 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I99bfec14bd4ae475b0fa1fac5a7992f3e2e8d64a </div>
<div style="display:none"> Gerrit-Change-Number: 8464 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: sungtae kim <pchero21@gmail.com> </div>