[asterisk-commits] file: trunk r114030 - in /trunk: ./ apps/app_meetme.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 10 10:10:48 CDT 2008


Author: file
Date: Thu Apr 10 10:10:47 2008
New Revision: 114030

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114030
Log:
Merged revisions 114029 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114029 | file | 2008-04-10 12:09:04 -0300 (Thu, 10 Apr 2008) | 6 lines

Create the directory where name recordings will go if it does not exist.
(closes issue #12311)
Reported by: rkeene
Patches:
      12311-mkdir.diff uploaded by qwell (license 4)

........

Modified:
    trunk/   (props changed)
    trunk/apps/app_meetme.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_meetme.c?view=diff&rev=114030&r1=114029&r2=114030
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Thu Apr 10 10:10:47 2008
@@ -1694,8 +1694,17 @@
 	ast_mutex_unlock(&conf->playlock);
 
 	if (!(confflags & CONFFLAG_QUIET) && ((confflags & CONFFLAG_INTROUSER) || (confflags & CONFFLAG_INTROUSERNOREVIEW))) {
+		char destdir[PATH_MAX];
+
+		snprintf(destdir, sizeof(destdir), "%s/meetme", ast_config_AST_SPOOL_DIR);
+
+		if (mkdir(destdir, 0777) && errno != EEXIST) {
+			ast_log(LOG_WARNING, "mkdir '%s' failed: %s\n", destdir, strerror(errno));
+			goto outrun;
+		}
+
 		snprintf(user->namerecloc, sizeof(user->namerecloc),
-			 "%s/meetme/meetme-username-%s-%d", ast_config_AST_SPOOL_DIR,
+			 "%s/meetme-username-%s-%d", destdir,
 			 conf->confno, user->user_no);
 		if (confflags & CONFFLAG_INTROUSERNOREVIEW)
 			res = ast_play_and_record(chan, "vm-rec-name", user->namerecloc, 10, "sln", &duration, ast_dsp_get_threshold_from_settings(THRESHOLD_SILENCE), 0, NULL);




More information about the asterisk-commits mailing list