aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-05 07:03:24 +0000
committerroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-08-05 07:03:24 +0000
commit2fb0baf6dffa41b6aebdf340ff94fa4275880dc4 (patch)
tree275928bf530a8b8509fbccaaf31f85146f2898f3 /apps
parent552131f9f011aa28df20342b70368db5a4b3eb58 (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@38949 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_dial.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 130006f6e..e2393336d 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -31,6 +31,7 @@
#include <stdio.h>
#include <sys/time.h>
#include <sys/signal.h>
+#include <sys/stat.h>
#include <netinet/in.h>
#include "asterisk.h"
@@ -965,7 +966,13 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
unless it is already there-- this should be done before the
call is actually dialed */
- /* make sure the priv-callerintros dir exists? */
+ /* make sure the priv-callerintros dir actually exists */
+ snprintf(privintro, sizeof(privintro), "%s/sounds/priv-callerintros", ast_config_AST_VAR_DIR);
+ if (mkdir(privintro, 0755) && errno != EEXIST) {
+ ast_log(LOG_WARNING, "privacy: can't create directory priv-callerintros: %s\n", strerror(errno));
+ res = -1;
+ goto out;
+ }
snprintf(privintro,sizeof(privintro),"priv-callerintros/%s", privcid);
if( ast_fileexists(privintro,NULL,NULL ) > 0 && strncmp(privcid,"NOCALLERID",10) != 0) {