diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-22 04:35:12 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-22 04:35:12 +0000 |
commit | ed2b193e6c6d0cce882796969369e305075103e0 (patch) | |
tree | 45f02eef0ac120e193459b71f73a7b62b7db8784 /apps/app_dial.c | |
parent | de3fbdf9699a307db497cd68d3d9d044936d7b4f (diff) |
Issue 9990 - New API ast_mkdir, which creates parent directories as necessary (and is faster than an outcall to mkdir -p)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71040 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r-- | apps/app_dial.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 7ecf8eef1..035604e67 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1146,13 +1146,13 @@ static int setup_privacy_args(struct privacy_args *pa, /* make sure the priv-callerintros dir actually exists */ snprintf(pa->privintro, sizeof(pa->privintro), "%s/sounds/priv-callerintros", ast_config_AST_DATA_DIR); - if (mkdir(pa->privintro, 0755) && errno != EEXIST) { - ast_log(LOG_WARNING, "privacy: can't create directory priv-callerintros: %s\n", strerror(errno)); + if ((res = ast_mkdir(pa->privintro, 0755))) { + ast_log(LOG_WARNING, "privacy: can't create directory priv-callerintros: %s\n", strerror(res)); return -1; } - snprintf(pa->privintro,sizeof(pa->privintro), "priv-callerintros/%s", pa->privcid); - if (ast_fileexists(pa->privintro,NULL,NULL ) > 0 && strncmp(pa->privcid,"NOCALLERID",10) != 0) { + snprintf(pa->privintro, sizeof(pa->privintro), "priv-callerintros/%s", pa->privcid); + if (ast_fileexists(pa->privintro, NULL, NULL ) > 0 && strncmp(pa->privcid, "NOCALLERID", 10) != 0) { /* the DELUX version of this code would allow this caller the option to hear and retape their previously recorded intro. */ |