Fixing failure to set default blocksize if options were provided but blksize
was not one of them.
This commit is contained in:
parent
1a2b556771
commit
f4a3ff6356
1 changed files with 7 additions and 6 deletions
|
@ -408,13 +408,14 @@ class TftpState(object):
|
||||||
if not self.context.tidport:
|
if not self.context.tidport:
|
||||||
self.context.tidport = rport
|
self.context.tidport = rport
|
||||||
log.info("Setting tidport to %s" % rport)
|
log.info("Setting tidport to %s" % rport)
|
||||||
if not options:
|
|
||||||
log.debug("Setting default options, blksize")
|
log.debug("Setting default options, blksize")
|
||||||
# FIXME: put default options elsewhere
|
self.context.options = { 'blksize': DEF_BLKSIZE }
|
||||||
self.context.options = { 'blksize': DEF_BLKSIZE }
|
|
||||||
else:
|
if options:
|
||||||
log.debug("Options requested: %s" % options)
|
log.debug("Options requested: %s" % options)
|
||||||
self.context.options = self.returnSupportedOptions(options)
|
supported_options = self.returnSupportedOptions(options)
|
||||||
|
self.context.options.update(supported_options)
|
||||||
sendoack = True
|
sendoack = True
|
||||||
|
|
||||||
# FIXME - only octet mode is supported at this time.
|
# FIXME - only octet mode is supported at this time.
|
||||||
|
|
Reference in a new issue