aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-02-17 15:05:26 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-02-17 15:05:26 +0000
commitfba0551561031d794fe6a96c18da6701b2091030 (patch)
tree79a733ec0cbcd760c1468522f1deca1b98938b62 /res
parent14d63f46f5054faca62b3d6b9d78b8292e189799 (diff)
Make sure we search for url prefix only in format, not in filename (bug #3613)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5041 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rwxr-xr-xres/res_monitor.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/res/res_monitor.c b/res/res_monitor.c
index 02c158362..a07e56d4b 100755
--- a/res/res_monitor.c
+++ b/res/res_monitor.c
@@ -323,13 +323,6 @@ static int start_monitor_exec(struct ast_channel *chan, void *data)
if (data && !ast_strlen_zero((char*)data)) {
arg = ast_strdupa((char*)data);
format = arg;
- arg = strchr(format,':');
- if (arg)
- {
- *arg++ = 0;
- urlprefix = arg;
- }
- else arg = format;
fname_base = strchr(arg, '|');
if (fname_base) {
*fname_base = 0;
@@ -343,9 +336,13 @@ static int start_monitor_exec(struct ast_channel *chan, void *data)
waitforbridge = 1;
}
}
+ arg = strchr(format,':');
+ if (arg) {
+ *arg++ = 0;
+ urlprefix = arg;
+ }
}
- if (urlprefix)
- {
+ if (urlprefix) {
snprintf(tmp,sizeof(tmp) - 1,"%s/%s.%s",urlprefix,fname_base,
((strcmp(format,"gsm")) ? "wav" : "gsm"));
if (!chan->cdr)