<p>Richard Mudgett has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/8463">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/63/8463/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 db6b757..485d03f 100644<br>--- a/apps/app_voicemail.c<br>+++ b/apps/app_voicemail.c<br>@@ -13346,11 +13346,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/8463">change 8463</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/8463"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13.20 </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: 8463 </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>