summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael P. Soulier <msoulier@digitaltorque.ca>2010-07-20 15:41:15 -0400
committerMichael P. Soulier <msoulier@digitaltorque.ca>2010-07-20 15:41:15 -0400
commit45185ed44c53fefc9450a4e307eb66373f30b7a6 (patch)
tree186dae08ca0d9a4c19fa145b0fd7c6682fd24422
parente1b1be2107b0656c487eef036b11820db4995605 (diff)
downloadtftpy-45185ed44c53fefc9450a4e307eb66373f30b7a6.tar.gz
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.
-rw-r--r--tftpy/TftpStates.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tftpy/TftpStates.py b/tftpy/TftpStates.py
index 103dbc0..fdc4566 100644
--- a/tftpy/TftpStates.py
+++ b/tftpy/TftpStates.py
@@ -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