OSDN Git Service

Fix return status from ap_scan command
authorDmitry Shmidt <dimitrysh@google.com>
Thu, 25 Mar 2010 21:21:26 +0000 (14:21 -0700)
committerDmitry Shmidt <dimitrysh@google.com>
Thu, 25 Mar 2010 21:21:26 +0000 (14:21 -0700)
Change-Id: Ib719d34d126dc01678c101de8e970480661b6929
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
wpa_supplicant/ctrl_iface.c

index f233012..38908df 100644 (file)
@@ -1603,7 +1603,7 @@ static int wpa_supplicant_ctrl_iface_ap_scan(
 #ifdef ANDROID
        if ((ap_scan == 2) && (wpa_s->wpa_state != WPA_COMPLETED)) {
                wpa_printf(MSG_ERROR, "ap_scan = %d", wpa_s->conf->ap_scan);
-               return -1;
+               return 0;
        }
        wpa_printf(MSG_ERROR, "ap_scan = %d", ap_scan);
 #endif
@@ -1638,10 +1638,10 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
                wpa_hexdump_ascii_key(MSG_DEBUG, "RX ctrl_iface",
                                      (const u8 *) buf, os_strlen(buf));
        } else {
-        if (os_strcmp(buf, "PING") != 0) {
+               if (os_strcmp(buf, "PING") != 0) {
                    wpa_hexdump_ascii(MSG_DEBUG, "RX ctrl_iface",
                                  (const u8 *) buf, os_strlen(buf));
-        }
+               }
        }
 
        reply = os_malloc(reply_size);