diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-04-22 17:06:16 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-04-22 17:06:16 +0100 |
commit | 601103f1737b2e9a3243f2bcc1dcd06bdd55d388 (patch) | |
tree | a038aed7bf7e81455bea110007af9e5f9effaee6 | |
parent | 8d7aee1581144c2e8ca664aebc36ef61a32f69ec (diff) | |
download | connman-601103f1737b2e9a3243f2bcc1dcd06bdd55d388.tar.gz connman-601103f1737b2e9a3243f2bcc1dcd06bdd55d388.tar.bz2 connman-601103f1737b2e9a3243f2bcc1dcd06bdd55d388.zip |
Fix broken mode and security string comparison
-rw-r--r-- | src/service.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/service.c b/src/service.c index 106595b9..768e9743 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; |