mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 19:08:14 +00:00
Fix show voicemail users for <context>. Bugs #820
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -3051,16 +3051,19 @@ static int handle_show_voicemail_users(int fd, int argc, char *argv[])
|
|||||||
struct dirent *vment;
|
struct dirent *vment;
|
||||||
int vmcount = 0;
|
int vmcount = 0;
|
||||||
char count[12];
|
char count[12];
|
||||||
make_dir(dirname, 255, vmu->context, vmu->mailbox, "INBOX");
|
|
||||||
if ((vmdir = opendir(dirname))) {
|
if ((argc == 3) || ((argc == 5) && !strcmp(argv[4],vmu->context))) {
|
||||||
/* No matter what the format of VM, there will always be a .txt file for each message. */
|
make_dir(dirname, 255, vmu->context, vmu->mailbox, "INBOX");
|
||||||
while ((vment = readdir(vmdir)))
|
if ((vmdir = opendir(dirname))) {
|
||||||
if (!strncmp(vment->d_name + 7,".txt",4))
|
/* No matter what the format of VM, there will always be a .txt file for each message. */
|
||||||
vmcount++;
|
while ((vment = readdir(vmdir)))
|
||||||
closedir(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;
|
vmu = vmu->next;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user