From d39f354e0f0403e111af84dc5ed285350dfb1de1 Mon Sep 17 00:00:00 2001 From: Adriana Draghici Date: Fri, 27 Nov 2009 13:18:16 +0000 Subject: [PATCH] Tribler: fixed 2 print instructions in Connecter.py, which were not printing the timestamp. --- tribler-mod/Tribler/Core/BitTornado/BT1/Connecter.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tribler-mod/Tribler/Core/BitTornado/BT1/Connecter.py b/tribler-mod/Tribler/Core/BitTornado/BT1/Connecter.py index 5bf9790..aef6652 100644 --- a/tribler-mod/Tribler/Core/BitTornado/BT1/Connecter.py +++ b/tribler-mod/Tribler/Core/BitTornado/BT1/Connecter.py @@ -1,4 +1,7 @@ from time import localtime, strftime + + + # Written by Bram Cohen, Pawel Garbacki and Arno Bakker # see LICENSE.txt for license information @@ -154,7 +157,7 @@ class Connection: def close(self): if DEBUG: - print >>sys.strderr, 'connection closed' + print >>sys.stderr, strftime("%d-%m-%Y %H:%M:%S", localtime())," ", 'connection closed' if self.get_ip() == self.connecter.tracker_ip: print >>sys.stderr, strftime("%d-%m-%Y %H:%M:%S", localtime())," ","connecter: close: live: WAAH closing SOURCE" @@ -206,6 +209,7 @@ class Connection: self._send_message(CANCEL + tobinary(index) + tobinary(begin) + tobinary(length)) if DEBUG_NORMAL_MSGS: + #print >>sys.stderr, strftime("%d-%m-%Y %H:%M:%S", localtime())," ", 'sent cancel: '+str(index)+': '+str(begin)+'-'+str(begin+length) print >>sys.strderr, 'sent cancel: '+str(index)+': '+str(begin)+'-'+str(begin+length) def send_bitfield(self, bitfield): @@ -257,7 +261,7 @@ class Connection: tobinary(len(piece) + 9), PIECE, tobinary(index), tobinary(begin), piece.tostring())) if DEBUG_NORMAL_MSGS: - print >>sys.strderr, 'sending chunk: '+str(index)+': '+str(begin)+'-'+str(begin+len(piece)) + print >>sys.stderr, strftime("%d-%m-%Y %H:%M:%S", localtime())," ", 'sending chunk: '+str(index)+': '+str(begin)+'-'+str(begin+len(piece)) if bytes < len(self.partial_message): self.connection.send_message_raw(self.partial_message[:bytes]) @@ -290,6 +294,7 @@ class Connection: return not self.connection.is_flushed() def got_request(self, i, p, l): + self.upload.got_request(i, p, l) if self.just_unchoked: self.connecter.ratelimiter.ping(clock() - self.just_unchoked) -- 2.20.1