summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
authorNélio Laranjeiro2011-11-22 11:36:54 +0100
committerNélio Laranjeiro2011-11-28 17:12:30 +0100
commit935300fa224bbe24000e5ed0a27e01f74b3e7409 (patch)
tree7d2cb1512364e3e0be141459fe0e2081dfac5dee /cesar
parent555253e9f61beb47b6c45bafd58c2f84bc1851f0 (diff)
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.
Diffstat (limited to 'cesar')
-rw-r--r--cesar/maximus/python/tools/csi/csicore.py9
1 files changed, 7 insertions, 2 deletions
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 ()