From f6a861f645e0b978daabe5c2095a22cb69978d5c Mon Sep 17 00:00:00 2001 From: matteo Date: Mon, 24 Feb 2003 06:00:18 +0000 Subject: Mon Feb 24 07:00:01 CET 2003 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@622 f38db490-d61c-443f-a65b-d21fe96a405b --- app.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'app.c') diff --git a/app.c b/app.c index 2a8c12ef9..192b9d99a 100755 --- a/app.c +++ b/app.c @@ -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) -- cgit v1.2.3