mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2024-12-22 20:58:52 +00:00
service: Fix secret_service_ensure_session_finish error propagation
The condition checking g_task_is_valid was inverted, resulting in errors being ignored. Move the check to a g_return_val_if_fail to be in line with all other uses of g_task_is_valid. Fixes https://bugs.archlinux.org/task/63666
This commit is contained in:
parent
be541cf9d4
commit
aae0329ba3
@ -1321,13 +1321,12 @@ secret_service_ensure_session_finish (SecretService *self,
|
|||||||
{
|
{
|
||||||
g_return_val_if_fail (SECRET_IS_SERVICE (self), FALSE);
|
g_return_val_if_fail (SECRET_IS_SERVICE (self), FALSE);
|
||||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||||
|
g_return_val_if_fail (g_task_is_valid (result, self), FALSE);
|
||||||
|
|
||||||
if (!g_task_is_valid (result, self)) {
|
|
||||||
if (!g_task_propagate_boolean (G_TASK (result), error)) {
|
if (!g_task_propagate_boolean (G_TASK (result), error)) {
|
||||||
_secret_util_strip_remote_error (error);
|
_secret_util_strip_remote_error (error);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
g_return_val_if_fail (self->pv->session != NULL, FALSE);
|
g_return_val_if_fail (self->pv->session != NULL, FALSE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user