Mon Feb 24 07:00:01 CET 2003

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matteo Brancaleoni
2003-02-24 06:00:18 +00:00
parent 17769619c2
commit 7a67a8faa3
10 changed files with 94 additions and 20 deletions

16
app.c
View File

@@ -146,10 +146,24 @@ int ast_app_has_voicemail(char *mailbox)
DIR *dir;
struct dirent *de;
char fn[256];
char tmp[256]="";
char *mb, *cur;
int ret;
/* If no mailbox, return immediately */
if (!strlen(mailbox))
return 0;
if (strchr(mailbox, ',')) {
strncpy(tmp, mailbox, sizeof(tmp));
mb = tmp;
ret = 0;
while((cur = strsep(&mb, ", "))) {
if (strlen(cur)) {
if (ast_app_has_voicemail(cur))
return 1;
}
}
return 0;
}
snprintf(fn, sizeof(fn), "%s/vm/%s/INBOX", (char *)ast_config_AST_SPOOL_DIR, mailbox);
dir = opendir(fn);
if (!dir)