From: Marcel Holtmann Date: Mon, 24 Mar 2008 10:30:08 +0000 (+0100) Subject: Fix handling of networks without security X-Git-Tag: accepted/2.0alpha-wayland/20121110.002834~4875 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=22d523336fe891bd57af03e919d8fc59be4b2609;p=profile%2Fivi%2Fconnman.git Fix handling of networks without security --- diff --git a/plugins/supplicant.c b/plugins/supplicant.c index c8853e1..0ec9304 100644 --- a/plugins/supplicant.c +++ b/plugins/supplicant.c @@ -51,18 +51,6 @@ enum supplicant_state { STATE_DISCONNECTED, }; -// COMPLETED ==> ASSOCIATING -// ASSOCIATED ==> DISCONNECTED -// DISCONNECTED ==> INACTIVE - -// DISCONNECTED ==> SCANNING -// SCANNING ==> ASSOCIATED - -// ASSOCIATING ==> ASSOCIATED -// ASSOCIATED ==> 4WAY_HANDSHAKE -// 4WAY_HANDSHAKE ==> GROUP_HANDSHAKE -// GROUP_HANDSHAKE ==> COMPLETED - struct supplicant_task { DBusConnection *conn; int ifindex; @@ -457,13 +445,12 @@ static int set_network(struct supplicant_task *task, const char *network, append_entry(&dict, "ssid", DBUS_TYPE_STRING, &network); if (passphrase && strlen(passphrase) > 0) { - //exec_cmd(task, "SET_NETWORK 0 proto RSN WPA"); - //exec_cmd(task, "SET_NETWORK 0 key_mgmt WPA-PSK"); - + const char *key_mgmt = "WPA-PSK"; + append_entry(&dict, "key_mgmt", DBUS_TYPE_STRING, &key_mgmt); append_entry(&dict, "psk", DBUS_TYPE_STRING, &passphrase); } else { - //exec_cmd(task, "SET_NETWORK 0 proto RSN WPA"); - //exec_cmd(task, "SET_NETWORK 0 key_mgmt NONE"); + const char *key_mgmt = "NONE"; + append_entry(&dict, "key_mgmt", DBUS_TYPE_STRING, &key_mgmt); } dbus_message_iter_close_container(&array, &dict);