Fixing setNextBlock to roll over at 2**16 - 1 instead of 2**16, which was

causing problems when uploading large files.

Thanks to LawrenceK for the bug report. Fixes issue15.
master
Michael P. Soulier 2010-07-20 15:41:15 -04:00
parent e1b1be2107
commit 45185ed44c
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ class TftpContext(object):
host = property(gethost, sethost)
def setNextBlock(self, block):
if block > 2 ** 16:
if block >= 2 ** 16:
log.debug("Block number rollover to 0 again")
block = 0
self.__eblock = block