freifunk / meshkit

Meshkit is a generator for preconfigured images that can be used for freifunk
Other
43 stars 11 forks source link

return nil #9

Closed egmont1227 closed 10 years ago

egmont1227 commented 10 years ago

http://article.gmane.org/gmane.org.freifunk.berlin/15149 Hi,

der Wizard hatte ein paar ausgegeben Fehler. Ich weiß nicht, ob das allgemeine Fehler sind, aber diese Änderungen haben geholfen. (Vielleicht kann jemand, der den Code besser kennt, die Korrektheit prüfen.)

$ diff meshwizard.fixed.lua meshwizard.lua 98c98

< local hwtype = section[".type"]

  local hwtype = section.type

119c119

<

121c121

< if iwinfo.freqlist then

  if iwinfo then

file: /usr/lib/lua/luci/model/cbi/freifunk/meshwizard.lua

Beide Änderungen betrafen Fehler, die durch den Rückgabewert nil zustande kamen (ipairs(iwinfo.freqlist) und syscall).

Liebe Grüße chris

mmunz commented 10 years ago

The first diff is not correct. We want the wifi type there, your change would get the section type.

For the second one: I added a condition to meshwizard.lua for the case when iwinfo.freqlist is empty. see: http://luci.subsignal.org/trac/changeset/9978/

What type of wifi hardware were you using there?