<p>sungtae kim has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8448">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(+), 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/48/8448/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..df454fe 100644<br>--- a/apps/app_voicemail.c<br>+++ b/apps/app_voicemail.c<br>@@ -13284,7 +13284,28 @@<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>+            /* 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>          make_dir(dirname, sizeof(dirname), vmu->context, vmu->mailbox, "INBOX");<br>              astman_append(s,<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8448">change 8448</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/8448"/><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: I99bfec14bd4ae475b0fa1fac5a7992f3e2e8d64a </div>
<div style="display:none"> Gerrit-Change-Number: 8448 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: sungtae kim <pchero21@gmail.com> </div>