diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-03 23:16:55 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-03 23:16:55 +0000 |
commit | e78b7ada3657d681b3622265e83e1706effc14e9 (patch) | |
tree | 1211d77080106e657cc2de8d9ceedf69c0183a19 /res | |
parent | c2b797959b6fa4f6d8b27bbe27c612f91476dba3 (diff) |
Fix handling when MONITOR_EXEC is unspecified
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3141 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rwxr-xr-x | res/res_monitor.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/res/res_monitor.c b/res/res_monitor.c index 26308584f..8137c874d 100755 --- a/res/res_monitor.c +++ b/res/res_monitor.c @@ -233,8 +233,10 @@ int ast_monitor_stop( struct ast_channel *chan, int need_lock ) soxmix = 1; } snprintf(tmp, sizeof(tmp), "%s %s/%s-in.%s %s/%s-out.%s %s/%s.%s &", execute, dir, name, format, dir, name, format, dir, name, format); - if (soxmix) - snprintf(tmp2,sizeof(tmp2), "%s& rm -f %s/%s-* &",tmp, dir ,name); /* remove legs when done mixing */ + if (soxmix) { + snprintf(tmp2,sizeof(tmp2), "( %s && rm -f %s/%s-* ) &",tmp, dir ,name); /* remove legs when done mixing */ + strncpy(tmp, tmp2, sizeof(tmp) - 1); + } ast_verbose("monitor executing %s\n",tmp); if (ast_safe_system(tmp) == -1) ast_log(LOG_WARNING, "Execute of %s failed.\n",tmp); |