Code Review
/
integration
/
test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add play.py reading information
[integration/test.git]
/
tools
/
fastbgp
/
play.py
diff --git
a/tools/fastbgp/play.py
b/tools/fastbgp/play.py
index d04e2e75e7687127198bd4b07b656f5f846f9fed..21fd5a8175a9801df3c6fb51ac3ed31169174692 100755
(executable)
--- a/
tools/fastbgp/play.py
+++ b/
tools/fastbgp/play.py
@@
-1492,9
+1492,15
@@
class ReadTracker(object):
"""
# TODO: We could return the whole message, currently not needed.
# We assume the socket is readable.
"""
# TODO: We could return the whole message, currently not needed.
# We assume the socket is readable.
+ logger.info("Receiving %d bytes", self.bytes_to_read)
chunk_message = self.socket.recv(self.bytes_to_read)
chunk_message = self.socket.recv(self.bytes_to_read)
+ msglen = len(chunk_message)
+ logger.info("Received %d bytes", msglen)
self.msg_in += chunk_message
self.msg_in += chunk_message
- self.bytes_to_read -= len(chunk_message)
+ logger.info("Current message is %d bytes", len(self.msg_in))
+ self.bytes_to_read -= msglen
+ logger.info("Checking %d bytes to read (header=%s)",
+ self.bytes_to_read, self.reading_header)
# TODO: bytes_to_read < 0 is not possible, right?
if not self.bytes_to_read:
# Finished reading a logical block.
# TODO: bytes_to_read < 0 is not possible, right?
if not self.bytes_to_read:
# Finished reading a logical block.
@@
-1534,6
+1540,8
@@
class ReadTracker(object):
self.bytes_to_read = self.header_length
# We should not act upon peer_hold_time if we are reading
# something right now.
self.bytes_to_read = self.header_length
# We should not act upon peer_hold_time if we are reading
# something right now.
+ logger.info("Require %d bytes to read (header=%s)",
+ self.bytes_to_read, self.reading_header)
return
def decode_path_attributes(self, path_attributes_hex):
return
def decode_path_attributes(self, path_attributes_hex):