json: remove obsolete # comment handling

Comments are handled by the parser now. Keys and values starting
with # are intentional now.
This commit is contained in:
Wim Taymans 2021-06-10 17:59:53 +02:00
parent 826f52344f
commit 77a4ae380e
5 changed files with 4 additions and 17 deletions

View file

@ -53,9 +53,6 @@ static bool find_match(struct spa_json *arr, struct pw_properties *props)
if ((len = spa_json_next(&it[0], &value)) <= 0)
break;
if (key[0] == '#')
continue;
str = pw_properties_get(props, key);
if (spa_json_is_null(value, len)) {

View file

@ -2343,9 +2343,7 @@ again:
while (spa_json_get_string(&it[1], key, sizeof(key)-1) > 0) {
bool add = false;
if (key[0] == '#') {
add = false;
} else if (pw_properties_get(impl->modules, key) != NULL) {
if (pw_properties_get(impl->modules, key) != NULL) {
add = true;
} else {
snprintf(check_path, sizeof(check_path),
@ -2357,8 +2355,6 @@ again:
continue;
while (spa_json_get_string(&it[2], value, sizeof(value)-1) > 0) {
if (value[0] == '#')
continue;
pw_properties_set(impl->modules, value, "true");
}
}