[evolution-ews] Fix string comparison for Basic auth
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Fix string comparison for Basic auth
- Date: Thu, 24 Jul 2014 08:29:47 +0000 (UTC)
commit 377da62321797a9492de475aa1e59015bee487d1
Author: David Woodhouse <David Woodhouse intel com>
Date: Thu Jul 24 09:27:42 2014 +0100
Fix string comparison for Basic auth
Perhaps we should be using g_ascii_strcasecmp(). But this is sometimes
NULL, for NTLM auth, and there's no g_ascii_strcasecmp0().
Perhaps we should fix that so it consistently returns a non-NULL string,
rather than using NULL for NTLM...
Signed-off-by: David Woodhouse <David Woodhouse intel com>
src/server/e-ews-connection.c | 2 +-
src/server/e-ews-notification.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index b0aa901..c41d91d 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -1661,7 +1661,7 @@ ews_connection_constructor (GType gtype, guint n_properties,
g_object_get (G_OBJECT (ews_settings), "auth-mechanism", &auth_mech,
NULL);
- if (g_strcmp0 (auth_mech, "BASIC") != 0)
+ if (g_strcmp0 (auth_mech, "Basic") != 0)
soup_session_remove_feature_by_type (cnc->priv->soup_session,
SOUP_TYPE_AUTH_BASIC);
if (!auth_mech) /* NTLM */
diff --git a/src/server/e-ews-notification.c b/src/server/e-ews-notification.c
index cbd6eb1..0915b50 100644
--- a/src/server/e-ews-notification.c
+++ b/src/server/e-ews-notification.c
@@ -235,7 +235,7 @@ ews_notification_constructor (GType gtype, guint n_properties,
g_object_get (G_OBJECT (ews_settings), "auth-mechanism", &auth_mech,
NULL);
- if (g_strcmp0 (auth_mech, "BASIC") != 0)
+ if (g_strcmp0 (auth_mech, "Basic") != 0)
soup_session_remove_feature_by_type (priv->soup_session,
SOUP_TYPE_AUTH_BASIC);
if (!auth_mech) /* NTLM */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]