[libgdata] core: Only propagate the first auth. error in the ClientLogin authorizer
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] core: Only propagate the first auth. error in the ClientLogin authorizer
- Date: Sat, 20 Aug 2011 16:56:23 +0000 (UTC)
commit 9e3042ef261a2972b2f882f9a71e5cf5a696f4fc
Author: Philip Withnall <philip tecnocode co uk>
Date: Sat Aug 20 17:37:26 2011 +0100
core: Only propagate the first auth. error in the ClientLogin authorizer
gdata/gdata-client-login-authorizer.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gdata/gdata-client-login-authorizer.c b/gdata/gdata-client-login-authorizer.c
index ce50522..7120b98 100644
--- a/gdata/gdata-client-login-authorizer.c
+++ b/gdata/gdata-client-login-authorizer.c
@@ -886,9 +886,13 @@ authenticate_thread (GSimpleAsyncResult *result, GDataClientLoginAuthorizer *aut
success = authenticate (authorizer, domain, data->username, data->password, NULL, NULL, cancellable, &authenticate_error) && success;
- if (success == FALSE) {
+ /* Only propagate the first error which occurs. */
+ if (success == FALSE && error == NULL) {
g_propagate_error (&error, authenticate_error);
+ authenticate_error = NULL;
}
+
+ g_clear_error (&authenticate_error);
}
g_static_rec_mutex_unlock (&(priv->mutex));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]