Index: app_hasnewvoicemail.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_hasnewvoicemail.c,v retrieving revision 1.2 diff -u -r1.2 app_hasnewvoicemail.c --- app_hasnewvoicemail.c 29 Sep 2003 20:13:54 -0000 1.2 +++ app_hasnewvoicemail.c 7 Dec 2003 04:24:27 -0000 @@ -42,6 +42,7 @@ #include +#include "../astconf.h" static char *tdesc = "Indicator for whether a voice mailbox has new messages."; static char *app_hasnewvoicemail = "HasNewVoicemail"; @@ -82,7 +83,8 @@ vmbox = strsep(&context,"@"); } - snprintf(vmpath,255,ASTSPOOLDIR "/voicemail/%s/%s/INBOX", context, vmbox); + /* XXX should not hardcode MAXPATHLEN XXX */ + snprintf(vmpath,255, "%s/voicemail/%s/%s/INBOX", (char *)ast_config_AST_SPOOL_DIR, context, vmbox); if (!(vmdir = opendir(vmpath))) { ast_log(LOG_NOTICE, "Voice mailbox %s at %s does not exist\n", vmbox, vmpath); } else {