]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Pass apdev to hostapd.terminate()
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>
Thu, 7 Apr 2016 05:38:00 +0000 (07:38 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 24 Apr 2016 08:51:06 +0000 (11:51 +0300)
Pass apdev dictionary to hostapd.terminate() to support operation with a
remote test host.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
tests/hwsim/hostapd.py

index 6becb8ed8efed40add26775c601fe761635d206a..931c66640c8504c2cb3ffd9b65cd7f5677c94e9d 100644 (file)
@@ -422,8 +422,15 @@ def remove_bss(apdev, ifname=None):
     hapd_global = HostapdGlobal(hostname=hostname, port=port)
     hapd_global.remove(ifname)
 
-def terminate(hostname=None, port=8878):
-    logger.info("Terminating hostapd")
+def terminate(apdev):
+    try:
+        hostname = apdev['hostname']
+        port = apdev['port']
+        logger.info("Terminating hostapd " + apdev['hostname'] + "/" + apdev['port'])
+    except:
+        hostname = None
+        port = 8878
+        logger.info("Terminating hostapd")
     hapd_global = HostapdGlobal(hostname=hostname, port=port)
     hapd_global.terminate()