From f75f0b20a8389a9ef187dd3e0968ede8d439c947 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 17 Apr 2013 14:42:03 -0400 Subject: [PATCH] preparation for switch from 32 bit time to 64 bit time in protocol --- bitmessagemain.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bitmessagemain.py b/bitmessagemain.py index aae51ae7..f68595dc 100755 --- a/bitmessagemain.py +++ b/bitmessagemain.py @@ -1481,6 +1481,8 @@ class receiveDataThread(QThread): if len(data) != lengthOfNumberOfAddresses + (38 * numberOfAddressesIncluded): print 'addr message does not contain the correct amount of data. Ignoring.' return + else: + print 'len of addr data is correct:', len(data) needToWriteKnownNodesToDisk = False for i in range(0,numberOfAddressesIncluded): @@ -1516,7 +1518,7 @@ class receiveDataThread(QThread): break #giving up on unpacking any more. We should still be connected however. try: - recaddrPort, = unpack('>H',data[36+lengthOfNumberOfAddresses+(38*i):42+lengthOfNumberOfAddresses+(38*i)]) + recaddrPort, = unpack('>H',data[36+lengthOfNumberOfAddresses+(38*i):38+lengthOfNumberOfAddresses+(38*i)]) except Exception, err: printLock.acquire() sys.stderr.write('ERROR TRYING TO UNPACK recaddr (recaddrPort). Message: %s\n' % str(err))