[svn-commits] russell: trunk r38929 - in /trunk: ./ apps/app_dial.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Fri Aug 4 23:39:44 MST 2006
Author: russell
Date: Sat Aug 5 01:39:43 2006
New Revision: 38929
URL: http://svn.digium.com/view/asterisk?rev=38929&view=rev
Log:
Merged revisions 38928 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r38928 | russell | 2006-08-05 02:37:59 -0400 (Sat, 05 Aug 2006) | 3 lines
make sure the priv-callerintros directory exists before trying to create a file
there (issue #7659, patch by hads, with some modifications by me)
........
Modified:
trunk/ (props changed)
trunk/apps/app_dial.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?rev=38929&r1=38928&r2=38929&view=diff
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Sat Aug 5 01:39:43 2006
@@ -37,6 +37,7 @@
#include <stdio.h>
#include <sys/time.h>
#include <sys/signal.h>
+#include <sys/stat.h>
#include <netinet/in.h>
#include "asterisk/lock.h"
@@ -1001,7 +1002,13 @@
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_DATA_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) {
More information about the svn-commits
mailing list