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.
This commit is contained in:
parent
e1b1be2107
commit
45185ed44c
1 changed files with 1 additions and 1 deletions
|
@ -132,7 +132,7 @@ class TftpContext(object):
|
||||||
host = property(gethost, sethost)
|
host = property(gethost, sethost)
|
||||||
|
|
||||||
def setNextBlock(self, block):
|
def setNextBlock(self, block):
|
||||||
if block > 2 ** 16:
|
if block >= 2 ** 16:
|
||||||
log.debug("Block number rollover to 0 again")
|
log.debug("Block number rollover to 0 again")
|
||||||
block = 0
|
block = 0
|
||||||
self.__eblock = block
|
self.__eblock = block
|
||||||
|
|
Reference in a new issue