Closed dartraiden closed 4 years ago
Line endings are platform dependent, and since vlmcsd is cross-platform, I would imagine it would make sense to make the code handles both LF and CRLF on any platform... I can suggest that upstream to the developer, and in the meantime, will look at the source code to see where ini file parsing is handled.
I’ve looked at the config file parsing code and it’s... rather unorthodox. vlmcsd bootstraps itself while reading the config file. Not sure why the dev (Hotbird64) chose this path, whether it’s just laziness, i.e. “evolution” of a quick hack into the codebase it is today, or whether there’s a “good” reason for doing this, such as efficiency or optimizing memory usage, for example.
I’m probably completely wrong here, but I think this “fix” would entail modifying multiple lines rather than changing a single function dealing with the config file, because there is no single function dealing with the config file. I am probably completely wrong on this, though.
In either case, it’s best to make the suggestion to the author upstream, not here.
The author (HotBird64) is aware of this issue and has committed to fixing it in future releases.
Still no new releases with fixes for this upstream. I did not forget about this issue. :)
vlmcsd.ini uses Windows line endings (CR LF)
This cause problems on some UNIX systems. For example, my Mi Router 3G with Padavan firmware
My vlmcsd.ini:
Converting ini to LF solves problem.