[asterisk-commits] rmudgett: trunk r393496 - /trunk/apps/app_mixmonitor.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 2 16:16:27 CDT 2013
Author: rmudgett
Date: Tue Jul 2 16:16:25 2013
New Revision: 393496
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=393496
Log:
MixMonitor: Make start_mixmonitor_callback() options parameter NULL tolerant.
* Removed some unnecessary code in start_mixmonitor_callback().
Modified:
trunk/apps/app_mixmonitor.c
Modified: trunk/apps/app_mixmonitor.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_mixmonitor.c?view=diff&rev=393496&r1=393495&r2=393496
==============================================================================
--- trunk/apps/app_mixmonitor.c (original)
+++ trunk/apps/app_mixmonitor.c Tue Jul 2 16:16:25 2013
@@ -1249,15 +1249,13 @@
static int start_mixmonitor_callback(struct ast_channel *chan, const char *filename, const char *options)
{
- char *opts[OPT_ARG_ARRAY_SIZE] = { NULL, };
- struct ast_flags flags = { 0 };
- char args[PATH_MAX] = "";
-
- if (!ast_strlen_zero(options)) {
- ast_app_parse_options(mixmonitor_opts, &flags, opts, ast_strdupa(options));
- }
-
- snprintf(args, sizeof(args), "%s,%s", filename, options);
+ char args[PATH_MAX];
+
+ if (ast_strlen_zero(options)) {
+ snprintf(args, sizeof(args), "%s", filename);
+ } else {
+ snprintf(args, sizeof(args), "%s,%s", filename, options);
+ }
return mixmonitor_exec(chan, args);
}
More information about the asterisk-commits
mailing list