diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-10 15:11:34 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-04-10 15:11:34 +0000 |
commit | c274c524012245958ea06c5485ae1d0179186245 (patch) | |
tree | c83d9a0587bf8bacee0bc8a7cd2f4580b72b74ce /apps/app_meetme.c | |
parent | 540d742798b07f07e21e6c1ac9adddb9e1fed523 (diff) |
Merged revisions 114030 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r114030 | file | 2008-04-10 12:10:47 -0300 (Thu, 10 Apr 2008) | 14 lines
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)
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@114031 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_meetme.c')
-rw-r--r-- | apps/app_meetme.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 6a74f36ea..f7b010ee2 100644 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -1695,8 +1695,17 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c 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); |