<p>sungtae kim has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8447">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: Ice2a28b6371df5c9625cd14615db69bcde53e4c2<br>---<br>M apps/app_voicemail.c<br>1 file changed, 21 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/47/8447/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..c4d4553 100644<br>--- a/apps/app_voicemail.c<br>+++ b/apps/app_voicemail.c<br>@@ -13284,7 +13284,27 @@<br>   AST_LIST_TRAVERSE(&users, vmu, list) {<br>            char dirname[256];<br>            int new, old;<br>-                inboxcount(vmu->mailbox, &new, &old);<br>+             char *mailbox;<br>+               int ret;<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. user[%s], context[%s]\n", vmu->mailbox ?: "", vmu->context ?: "");<br>+                      return 0;<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/8447">change 8447</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/8447"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ice2a28b6371df5c9625cd14615db69bcde53e4c2 </div>
<div style="display:none"> Gerrit-Change-Number: 8447 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: sungtae kim <pchero21@gmail.com> </div>