aboutsummaryrefslogtreecommitdiffstats
path: root/app.c
diff options
context:
space:
mode:
authormatteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b>2003-02-24 06:00:18 +0000
committermatteo <matteo@f38db490-d61c-443f-a65b-d21fe96a405b>2003-02-24 06:00:18 +0000
commitf6a861f645e0b978daabe5c2095a22cb69978d5c (patch)
tree388e986b909e145722de5c909a1496e0402a4ac7 /app.c
parentb6be24372a79c5fe8568a831bab188db9ea98e8c (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-xapp.c16
1 files changed, 15 insertions, 1 deletions
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)