[gvfs/wip/oholy/debug: 8/10] http: Fix log level comparation
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/wip/oholy/debug: 8/10] http: Fix log level comparation
- Date: Wed, 6 Jan 2016 08:38:12 +0000 (UTC)
commit 7d0358706fe1aa02d7e60f8d602a7c760dd47450
Author: Ondrej Holy <oholy redhat com>
Date: Tue Jan 5 17:33:01 2016 +0100
http: Fix log level comparation
g_ascii_strcasecmp doesn't return boolean and thus the code needs fixes.
https://bugzilla.gnome.org/show_bug.cgi?id=740660
daemon/gvfsbackendhttp.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gvfsbackendhttp.c b/daemon/gvfsbackendhttp.c
index 347fd0d..317c8ed 100644
--- a/daemon/gvfsbackendhttp.c
+++ b/daemon/gvfsbackendhttp.c
@@ -737,10 +737,10 @@ g_vfs_backend_http_class_init (GVfsBackendHttpClass *klass)
SoupLogger *logger;
SoupLoggerLogLevel level;
- if (g_ascii_strcasecmp (debug, "all") ||
- g_ascii_strcasecmp (debug, "body"))
+ if (g_ascii_strcasecmp (debug, "all") == 0 ||
+ g_ascii_strcasecmp (debug, "body") == 0)
level = SOUP_LOGGER_LOG_BODY;
- else if (g_ascii_strcasecmp (debug, "header"))
+ else if (g_ascii_strcasecmp (debug, "header") == 0)
level = SOUP_LOGGER_LOG_HEADERS;
else
level = SOUP_LOGGER_LOG_MINIMAL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]