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 fc_plugin *pl = NULL;
|
||||||
struct plugin *hndl;
|
struct plugin *hndl;
|
||||||
int res = 0;
|
|
||||||
const struct spa_support *support;
|
const struct spa_support *support;
|
||||||
uint32_t n_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);
|
pl = load_lv2_plugin(support, n_support, path, NULL);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
else {
|
||||||
|
pl = NULL;
|
||||||
|
errno = EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (pl == NULL)
|
if (pl == NULL)
|
||||||
goto exit;
|
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);
|
spa_list_append(&impl->plugin_list, &hndl->link);
|
||||||
|
|
||||||
return hndl;
|
return hndl;
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
errno = -res;
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue