[asterisk-commits] mmichelson: trunk r71630 - /trunk/apps/app_voicemail.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jun 25 11:13:27 CDT 2007
Author: mmichelson
Date: Mon Jun 25 11:13:26 2007
New Revision: 71630
URL: http://svn.digium.com/view/asterisk?view=rev&rev=71630
Log:
Using inboxcount instead of countmessages.
Modified:
trunk/apps/app_voicemail.c
Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=71630&r1=71629&r2=71630
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Mon Jun 25 11:13:26 2007
@@ -4879,6 +4879,7 @@
return 0;
}
+
#else
static int open_mailbox(struct vm_state *vms, struct ast_vm_user *vmu,int box)
{
@@ -7597,6 +7598,11 @@
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 @@
"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 @@
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
);
}
More information about the asterisk-commits
mailing list