summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tftpy/TftpStates.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tftpy/TftpStates.py b/tftpy/TftpStates.py
index ac464b9..f99d7c9 100644
--- a/tftpy/TftpStates.py
+++ b/tftpy/TftpStates.py
@@ -408,13 +408,14 @@ class TftpState(object):
if not self.context.tidport:
self.context.tidport = rport
log.info("Setting tidport to %s" % rport)
- if not options:
- log.debug("Setting default options, blksize")
- # FIXME: put default options elsewhere
- self.context.options = { 'blksize': DEF_BLKSIZE }
- else:
+
+ log.debug("Setting default options, blksize")
+ self.context.options = { 'blksize': DEF_BLKSIZE }
+
+ if 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
# FIXME - only octet mode is supported at this time.