summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2007-06-25 16:13:26 +0000
committerMark Michelson <mmichelson@digium.com>2007-06-25 16:13:26 +0000
commit3f3a8af232e7297b52e33fb5b03c1a735721f592 (patch)
tree1a95ccfcef4b20592145579ab7d724126a4b69ac /apps
parentd77301b8cd72c72d8d4bdc70b0557bcec3685b3b (diff)
Using inboxcount instead of countmessages.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index e5572dd58..c46e43f57 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -4879,6 +4879,7 @@ static int open_mailbox(struct vm_state *vms, struct ast_vm_user *vmu, int box)
return 0;
}
+
#else
static int open_mailbox(struct vm_state *vms, struct ast_vm_user *vmu,int box)
{
@@ -7597,6 +7598,11 @@ static int manager_list_voicemail_users(struct mansession *s, const struct messa
AST_LIST_TRAVERSE(&users, vmu, list) {
char dirname[256];
+
+#ifdef IMAP_STORAGE
+ int new, old;
+ inboxcount (vmu->mailbox, &new, &old);
+#endif
make_dir(dirname, sizeof(dirname), vmu->context, vmu->mailbox, "INBOX");
astman_append(s,
@@ -7622,6 +7628,7 @@ static int manager_list_voicemail_users(struct mansession *s, const struct messa
"MaxMessageLength: %d\r\n"
"NewMessageCount: %d\r\n"
#ifdef IMAP_STORAGE
+ "OldMessageCount: %d\r\n"
"IMAPUser: %s\r\n"
#endif
"\r\n",
@@ -7629,9 +7636,11 @@ static int manager_list_voicemail_users(struct mansession *s, const struct messa
vmu->pager, vmu->serveremail, vmu->mailcmd, vmu->language,
vmu->zonetag, vmu->callback, vmu->dialout, vmu->uniqueid,
vmu->exit, vmu->saydurationm, vmu->attachfmt, vmu->volgain,
- vmu->maxmsg, vmu->maxsecs, count_messages(vmu, dirname)
+ vmu->maxmsg, vmu->maxsecs,
#ifdef IMAP_STORAGE
- , vmu->imapuser
+ new, old, vmu->imapuser
+#else
+ count_messages(vmu, dirname)
#endif
);
}