From: Mark Michelson Date: Mon, 25 Jun 2007 16:13:26 +0000 (+0000) Subject: Using inboxcount instead of countmessages. X-Git-Tag: 1.6.0-beta1~3^2~2256 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f3a8af232e7297b52e33fb5b03c1a735721f592;p=thirdparty%2Fasterisk.git Using inboxcount instead of countmessages. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71630 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index e5572dd58a..c46e43f578 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 ); }