]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Clear global monitor interface on dump_monitor()
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 25 Sep 2013 13:45:45 +0000 (16:45 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 25 Sep 2013 13:45:45 +0000 (16:45 +0300)
This avoids some issues with the global control interface socket
getting stuck with send buffer limit reached if test cases did not
use wait_global_event().

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

tests/hwsim/wpasupplicant.py

index d1793d3928f637e4a0938d3ecd7c11fd5b733cd9..fa17101102598a3b51559bb609c5bf941239a1db 100644 (file)
@@ -318,7 +318,7 @@ class WpaSupplicant:
                 time.sleep(0.1)
                 while self.global_mon.pending():
                     ev = self.global_mon.recv()
-                    logger.debug(self.ifname + ": " + ev)
+                    logger.debug(self.ifname + "(global): " + ev)
                     for event in events:
                         if event in ev:
                             return ev
@@ -335,6 +335,9 @@ class WpaSupplicant:
         while self.mon.pending():
             ev = self.mon.recv()
             logger.debug(self.ifname + ": " + ev)
+        while self.global_mon.pending():
+            ev = self.global_mon.recv()
+            logger.debug(self.ifname + "(global): " + ev)
 
     def remove_group(self, ifname=None):
         if ifname is None: