mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-18 08:56:45 -05:00
pulse-server: improve module argument parsing
ticks also delimit strings. Unescape values. Fixes #1173
This commit is contained in:
parent
3ae2b9e189
commit
ab9023f752
1 changed files with 9 additions and 5 deletions
|
|
@ -127,15 +127,19 @@ void module_args_add_props(struct pw_properties *props, const char *str)
|
||||||
if (*p == '\"') {
|
if (*p == '\"') {
|
||||||
p++;
|
p++;
|
||||||
f = '\"';
|
f = '\"';
|
||||||
|
} else if (*p == '\'') {
|
||||||
|
p++;
|
||||||
|
f = '\'';
|
||||||
} else {
|
} else {
|
||||||
f = ' ';
|
f = ' ';
|
||||||
}
|
}
|
||||||
v = p;
|
v = p;
|
||||||
e = strchr(p, f);
|
for (e = p; *e ; e++) {
|
||||||
if (e == NULL)
|
if (*e == f)
|
||||||
e = strchr(p, '\0');
|
break;
|
||||||
if (e == NULL)
|
if (*e == '\\')
|
||||||
break;
|
e++;
|
||||||
|
}
|
||||||
p = e;
|
p = e;
|
||||||
if (*e != '\0')
|
if (*e != '\0')
|
||||||
p++;
|
p++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue