[asterisk-commits] file: branch 1.4 r114029 - /branches/1.4/apps/app_meetme.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Apr 10 10:09:04 CDT 2008
Author: file
Date: Thu Apr 10 10:09:04 2008
New Revision: 114029
URL: http://svn.digium.com/view/asterisk?view=rev&rev=114029
Log:
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:
branches/1.4/apps/app_meetme.c
Modified: branches/1.4/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_meetme.c?view=diff&rev=114029&r1=114028&r2=114029
==============================================================================
--- branches/1.4/apps/app_meetme.c (original)
+++ branches/1.4/apps/app_meetme.c Thu Apr 10 10:09:04 2008
@@ -1482,8 +1482,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, 128, 0, NULL);
More information about the asterisk-commits
mailing list