summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorSungtae Kim <pchero21@gmail.com>2017-12-04 10:40:18 +0100
committerstk <pchero21@gmail.com>2017-12-04 10:51:49 +0100
commit0611fe581ce72e511320922f18fa14664def92b3 (patch)
tree48798ccb2c5127400ec9624edaced11a41b27e5d /apps
parent075faac2fd74a79b4f418d1d02a864383b076d05 (diff)
Add new object for VoicemailUserEntry
Currently, when the app_voicemail sending VoicemailUserEntry AMI event, there's no OldMessageCount info for default. To check the OldMessageCount info, it required IMAP_STORAGE define, but this is not correct. Added OldMessageCount item as a default. ASTERISK-27456 Change-Id: I5c71521c2d1daf8b7b161e31c34d28cca6aea4c7
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index ecd423f86..d01730101 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -13283,11 +13283,8 @@ 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,
@@ -13319,8 +13316,8 @@ static int manager_list_voicemail_users(struct mansession *s, const struct messa
"MaxMessageCount: %d\r\n"
"MaxMessageLength: %d\r\n"
"NewMessageCount: %d\r\n"
-#ifdef IMAP_STORAGE
"OldMessageCount: %d\r\n"
+#ifdef IMAP_STORAGE
"IMAPUser: %s\r\n"
"IMAPServer: %s\r\n"
"IMAPPort: %s\r\n"
@@ -13353,14 +13350,14 @@ static int manager_list_voicemail_users(struct mansession *s, const struct messa
ast_test_flag(vmu, VM_OPERATOR) ? "Yes" : "No",
vmu->maxmsg,
vmu->maxsecs,
+ new,
+ old
#ifdef IMAP_STORAGE
- new, old,
+ ,
vmu->imapuser,
vmu->imapserver,
vmu->imapport,
vmu->imapflags
-#else
- count_messages(vmu, dirname)
#endif
);
++num_users;