Fix broken check for security modes
authorMartin Xu <martin.xu@intel.com>
Mon, 3 Aug 2009 10:13:57 +0000 (18:13 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 3 Aug 2009 15:59:37 +0000 (08:59 -0700)
src/service.c

index f9cb020..b778472 100644 (file)
@@ -1408,9 +1408,9 @@ int __connman_service_create_and_connect(DBusMessage *msg)
                return -EINVAL;
 
        if (g_strcmp0(security, "none") != 0 &&
-                       g_strcmp0(mode, "wep") != 0 &&
-                               g_strcmp0(mode, "wpa") != 0 &&
-                                       g_strcmp0(mode, "rsn") != 0)
+                       g_strcmp0(security, "wep") != 0 &&
+                               g_strcmp0(security, "wpa") != 0 &&
+                                       g_strcmp0(security, "rsn") != 0)
                return -EINVAL;
 
        device = __connman_element_find_device(CONNMAN_SERVICE_TYPE_WIFI);