From: Automerge script Date: Sat, 5 Aug 2006 07:03:24 +0000 (+0000) Subject: automerge commit X-Git-Tag: 1.2.11-netsec~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e91c55a99dda7012b2ad6297ffc4ef8303b4f5a9;p=thirdparty%2Fasterisk.git automerge commit git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@38949 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_dial.c b/apps/app_dial.c index 130006f6e6..e2393336da 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #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) {