From 601103f1737b2e9a3243f2bcc1dcd06bdd55d388 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 22 Apr 2009 17:06:16 +0100 Subject: [PATCH] Fix broken mode and security string comparison --- src/service.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/service.c b/src/service.c index 106595b..768e974 100644 --- a/src/service.c +++ b/src/service.c @@ -741,9 +741,9 @@ static enum connman_service_mode convert_wifi_mode(const char *mode) { if (mode == NULL) return CONNMAN_SERVICE_MODE_UNKNOWN; - else if (g_str_equal(mode, "managed") == 0) + else if (g_str_equal(mode, "managed") == TRUE) return CONNMAN_SERVICE_MODE_MANAGED; - else if (g_str_equal(mode, "adhoc") == 0) + else if (g_str_equal(mode, "adhoc") == TRUE) return CONNMAN_SERVICE_MODE_ADHOC; else return CONNMAN_SERVICE_MODE_UNKNOWN; @@ -753,13 +753,13 @@ static enum connman_service_mode convert_wifi_security(const char *security) { if (security == NULL) return CONNMAN_SERVICE_SECURITY_UNKNOWN; - else if (g_str_equal(security, "none") == 0) + else if (g_str_equal(security, "none") == TRUE) return CONNMAN_SERVICE_SECURITY_NONE; - else if (g_str_equal(security, "wep") == 0) + else if (g_str_equal(security, "wep") == TRUE) return CONNMAN_SERVICE_SECURITY_WEP; - else if (g_str_equal(security, "wpa") == 0) + else if (g_str_equal(security, "wpa") == TRUE) return CONNMAN_SERVICE_SECURITY_WPA; - else if (g_str_equal(security, "wpa2") == 0) + else if (g_str_equal(security, "wpa2") == TRUE) return CONNMAN_SERVICE_SECURITY_WPA2; else return CONNMAN_SERVICE_SECURITY_UNKNOWN; -- 2.7.4