mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
MixMonitor: Make start_mixmonitor_callback() options parameter NULL tolerant.
* Removed some unnecessary code in start_mixmonitor_callback(). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1249,16 +1249,14 @@ static int manager_mute_mixmonitor(struct mansession *s, const struct message *m
|
|||||||
|
|
||||||
static int start_mixmonitor_callback(struct ast_channel *chan, const char *filename, const char *options)
|
static int start_mixmonitor_callback(struct ast_channel *chan, const char *filename, const char *options)
|
||||||
{
|
{
|
||||||
char *opts[OPT_ARG_ARRAY_SIZE] = { NULL, };
|
char args[PATH_MAX];
|
||||||
struct ast_flags flags = { 0 };
|
|
||||||
char args[PATH_MAX] = "";
|
|
||||||
|
|
||||||
if (!ast_strlen_zero(options)) {
|
if (ast_strlen_zero(options)) {
|
||||||
ast_app_parse_options(mixmonitor_opts, &flags, opts, ast_strdupa(options));
|
snprintf(args, sizeof(args), "%s", filename);
|
||||||
|
} else {
|
||||||
|
snprintf(args, sizeof(args), "%s,%s", filename, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(args, sizeof(args), "%s,%s", filename, options);
|
|
||||||
|
|
||||||
return mixmonitor_exec(chan, args);
|
return mixmonitor_exec(chan, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user