]> hydra-www.ietfng.org Git - acmetensortoys-esp-lua_core/commitdiff
net/nwfmqtt: fix handling of the "secure" option
authorNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sat, 6 Jul 2019 19:18:37 +0000 (20:18 +0100)
committerNathaniel Wesley Filardo <nwfilardo@gmail.com>
Sat, 6 Jul 2019 19:18:37 +0000 (20:18 +0100)
Really wants a number and not a boolean, apparently.  Ick, I should
fix that upstream, but for the moment, just use the parsed value or 0.

net/nwfmqtt.lua

index 2cc6e2a3a0523529da6ecf328e3661a1d420f4a1..8e38865a32c04eb5a8b784f543a60aea9611065d 100644 (file)
@@ -33,7 +33,7 @@ function self.connect(m,cf) -- make a connection with parameters from json file
   conf = nil
   broker = broker or "iot.eclipse.org"
   port = port or 1883
-  secure = (secure == 1) or 0
+  secure = secure or 0
   return m:connect(broker,port,secure)
 end
 function self.suball(m,fn) -- subscribe to all lines in a file