mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-08 13:30:08 -05:00
conf: only count modules, objects and exec when added
We don't actually do anything when the name, factory or path is NULL so don't count this as an action. Commenting out these keys is a usual way for commenting out complete sections.
This commit is contained in:
parent
8351a17197
commit
d0c9d2f99d
1 changed files with 15 additions and 17 deletions
|
|
@ -804,14 +804,13 @@ static int parse_modules(void *user_data, const char *location,
|
||||||
if (!have_match)
|
if (!have_match)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (name != NULL)
|
if (name != NULL) {
|
||||||
res = load_module(context, name, args, flags);
|
res = load_module(context, name, args, flags);
|
||||||
|
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
d->count++;
|
d->count++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
pw_log_warn("malformed object array in '%.*s'", (int)len, str);
|
pw_log_warn("malformed object array in '%.*s'", (int)len, str);
|
||||||
|
|
||||||
|
|
@ -915,13 +914,13 @@ static int parse_objects(void *user_data, const char *location,
|
||||||
if (!have_match)
|
if (!have_match)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (factory != NULL)
|
if (factory != NULL) {
|
||||||
res = create_object(context, factory, args, flags);
|
res = create_object(context, factory, args, flags);
|
||||||
|
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
break;
|
break;
|
||||||
d->count++;
|
d->count++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
pw_log_warn("malformed object array in '%.*s'", (int)len, str);
|
pw_log_warn("malformed object array in '%.*s'", (int)len, str);
|
||||||
|
|
||||||
|
|
@ -1035,14 +1034,13 @@ static int parse_exec(void *user_data, const char *location,
|
||||||
if (!have_match)
|
if (!have_match)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (path != NULL)
|
if (path != NULL) {
|
||||||
res = do_exec(context, path, args);
|
res = do_exec(context, path, args);
|
||||||
|
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
d->count++;
|
d->count++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
pw_log_warn("malformed object array in '%.*s'", (int)len, str);
|
pw_log_warn("malformed object array in '%.*s'", (int)len, str);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue