mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
filter-chain: improve error reporting
Don't overwrite the errno from the plugin loader with 0 so that we can actually report the right error.
This commit is contained in:
parent
bc8df52317
commit
580f499939
1 changed files with 5 additions and 3 deletions
|
|
@ -726,7 +726,6 @@ static struct plugin *plugin_load(struct impl *impl, const char *type, const cha
|
|||
{
|
||||
struct fc_plugin *pl = NULL;
|
||||
struct plugin *hndl;
|
||||
int res = 0;
|
||||
const struct spa_support *support;
|
||||
uint32_t n_support;
|
||||
|
||||
|
|
@ -750,6 +749,11 @@ static struct plugin *plugin_load(struct impl *impl, const char *type, const cha
|
|||
pl = load_lv2_plugin(support, n_support, path, NULL);
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
pl = NULL;
|
||||
errno = EINVAL;
|
||||
}
|
||||
|
||||
if (pl == NULL)
|
||||
goto exit;
|
||||
|
||||
|
|
@ -769,9 +773,7 @@ static struct plugin *plugin_load(struct impl *impl, const char *type, const cha
|
|||
spa_list_append(&impl->plugin_list, &hndl->link);
|
||||
|
||||
return hndl;
|
||||
|
||||
exit:
|
||||
errno = -res;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue