From 935300fa224bbe24000e5ed0a27e01f74b3e7409 Mon Sep 17 00:00:00 2001 From: NĂ©lio Laranjeiro Date: Tue, 22 Nov 2011 11:36:54 +0100 Subject: cesar/maximus/python/tools/csi: wait the number of frames transmitted Previous frames sent during the authentication were present in the transmitted list, this was causing the function to always wait the timeout expiration. --- cesar/maximus/python/tools/csi/csicore.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cesar') diff --git a/cesar/maximus/python/tools/csi/csicore.py b/cesar/maximus/python/tools/csi/csicore.py index 5d2e640c66..f3665011b2 100644 --- a/cesar/maximus/python/tools/csi/csicore.py +++ b/cesar/maximus/python/tools/csi/csicore.py @@ -327,6 +327,7 @@ class csiCore: def process_data_send_traffic (self, packet_list): + self.transmission_result_reset () for i in range (0, len (packet_list)): packet = packet_list[i] payload = "" @@ -379,8 +380,8 @@ class csiCore: maximus_current_date = self.__maximus.get_date () timeout_date = sec_to_tck (timeout_sec) + maximus_current_date print "Waiting transmission ends, please wait" - while (self.__maximus.get_date () < timeout_date - and len (self.__frames_sent) != len (self.__frames_recv)): + while (self.__maximus.get_date () < timeout_date \ + and len (self.__frames_sent) > len (self.__frames_recv)): self.process_wait_sec (0.1) def process_end_get_result (self): @@ -391,6 +392,10 @@ class csiCore: def transmission_result_reset (self): """Reset the counter of received or sent packets for the test.""" # Reset the transmission list. + for i in self.__frames_recv: + del i + for i in self.__frames_sent: + del i self.__frames_recv = list () self.__frames_sent = list () self.__test.reset () -- cgit v1.2.3