diff options
author | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-02-24 06:00:18 +0000 |
---|---|---|
committer | matteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-02-24 06:00:18 +0000 |
commit | f6a861f645e0b978daabe5c2095a22cb69978d5c (patch) | |
tree | 388e986b909e145722de5c909a1496e0402a4ac7 /app.c | |
parent | b6be24372a79c5fe8568a831bab188db9ea98e8c (diff) |
Mon Feb 24 07:00:01 CET 2003
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@622 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'app.c')
-rwxr-xr-x | app.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -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) |