[Asterisk-cvs] asterisk/apps app_voicemail.c,1.52,1.53
jeremy at lists.digium.com
jeremy at lists.digium.com
Mon Jan 12 18:44:02 CST 2004
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv22030/apps
Modified Files:
app_voicemail.c
Log Message:
Fix show voicemail users for <context>. Bugs #820
Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- app_voicemail.c 12 Jan 2004 23:21:29 -0000 1.52
+++ app_voicemail.c 13 Jan 2004 00:35:45 -0000 1.53
@@ -3051,16 +3051,19 @@
struct dirent *vment;
int vmcount = 0;
char count[12];
- make_dir(dirname, 255, vmu->context, vmu->mailbox, "INBOX");
- if ((vmdir = opendir(dirname))) {
- /* No matter what the format of VM, there will always be a .txt file for each message. */
- while ((vment = readdir(vmdir)))
- if (!strncmp(vment->d_name + 7,".txt",4))
- vmcount++;
- closedir(vmdir);
+
+ if ((argc == 3) || ((argc == 5) && !strcmp(argv[4],vmu->context))) {
+ make_dir(dirname, 255, vmu->context, vmu->mailbox, "INBOX");
+ if ((vmdir = opendir(dirname))) {
+ /* No matter what the format of VM, there will always be a .txt file for each message. */
+ while ((vment = readdir(vmdir)))
+ if (!strncmp(vment->d_name + 7,".txt",4))
+ vmcount++;
+ closedir(vmdir);
+ }
+ snprintf(count,11,"%d",vmcount);
+ ast_cli(fd, output_format, vmu->context, vmu->mailbox, vmu->fullname, vmu->zonetag, count);
}
- snprintf(count,11,"%d",vmcount);
- ast_cli(fd, output_format, vmu->context, vmu->mailbox, vmu->fullname, vmu->zonetag, count);
vmu = vmu->next;
}
} else {
More information about the svn-commits
mailing list