]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make RELOG command use global control interface
authorJouni Malinen <j@w1.fi>
Mon, 20 Oct 2014 08:22:16 +0000 (11:22 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 20 Oct 2014 09:52:25 +0000 (12:52 +0300)
This allows RELOG to be used even if a wpa_supplicant process does not
have any interfaces configured.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/run-tests.py
tests/hwsim/wpasupplicant.py
wpa_supplicant/ctrl_iface.c

index 1e4ccb95296e3eba94d6498ff64be7a0059186bd..8bd16f80e4ea87aec038399f413e737f1d83d5ff 100755 (executable)
@@ -382,7 +382,7 @@ def main():
                     logger.info(e)
                     result = "FAIL"
             try:
-                wpas = WpaSupplicant("wlan5", "/tmp/wpas-wlan5")
+                wpas = WpaSupplicant("/tmp/wpas-wlan5")
                 d.dump_monitor()
                 rename_log(args.logdir, 'log5', name, wpas)
                 if not args.no_reset:
index 7734f2ab6b3a64a0e3258ed8daec1559b1444c24..5cacfa10ef903fb91cdb3a00085e4be21c9de419 100644 (file)
@@ -834,7 +834,7 @@ class WpaSupplicant:
             raise Exception("Association with the AP timed out")
 
     def relog(self):
-        self.request("RELOG")
+        self.global_request("RELOG")
 
     def wait_completed(self, timeout=10):
         for i in range(0, timeout * 2):
index 56a05a7af57043a68b61ccd1685e0cf188bb55f9..3814149236da3bf6b27d309dc025c56ea9053f99 100644 (file)
@@ -7739,6 +7739,9 @@ char * wpa_supplicant_global_ctrl_iface_process(struct wpa_global *global,
                if (wpas_module_tests() < 0)
                        reply_len = -1;
 #endif /* CONFIG_MODULE_TESTS */
+       } else if (os_strncmp(buf, "RELOG", 5) == 0) {
+               if (wpa_debug_reopen_file() < 0)
+                       reply_len = -1;
        } else {
                os_memcpy(reply, "UNKNOWN COMMAND\n", 16);
                reply_len = 16;