command: fix load-module arguments

Reparse the arguments and pass all the remaining strings after the
module name as one arguments string.
This commit is contained in:
Wim Taymans 2020-02-07 13:25:19 +01:00
parent a7e36ddd9d
commit 4d143c5751
2 changed files with 5 additions and 1 deletions

View file

@ -218,6 +218,7 @@ static struct pw_command *parse_command_module_load(struct pw_properties *proper
this = &impl->this;
this->func = execute_command_module_load;
this->args = pw_split_strv(line, whitespace, INT_MAX, &this->n_args);
for (arg = 1; arg < this->n_args; arg++) {
@ -227,6 +228,9 @@ static struct pw_command *parse_command_module_load(struct pw_properties *proper
if (arg + 1 > this->n_args)
goto no_module;
pw_free_strv(this->args);
this->args = pw_split_strv(line, whitespace, arg + 2, &this->n_args);
impl->first_arg = arg;
return this;