The example for listen in the default lirc_options.conf is wrong. Instead of the port number it should be true/false, and the listen_hostport is missing.
Enabling just "listen" works only as long as the default port (8765) is used.
Patch:
--- a/lirc_options.conf
+++ b/lirc_options.conf
@@ -17,7 +17,8 @@
allow-simulate = No
repeat-max = 600
#effective-user =
-#listen = [address:]port
+#listen = True
+#listen_hostport = [address:]port
#connect = host[:port]
#loglevel = 6
#release = ...
OMG... that parsing is completely broken. How has this survived?
Anyway, your patch breaks the assumption that syntax in lirc_options.conf is the same as on the command line. Could you instead try https://paste.fedoraproject.org/511072/82419247 ?
If lirc --listen with a given argument works on your platform let's live with it, adding a note to the manpage that the argument is mandatory on platforms without glibc. Otherwise, I'm fine with changing the CLI syntax making the argument mandatory.
Works, but there is a small bug in opt2host_port (the strncpy does not copy the terminating zero).
Here is my version of the patch:
https://paste.fedoraproject.org/511488/
Using strcpy since the target buffer is guaranteed to be big enough.
Yes, --listen works.
Last edit: Felix Schmidt 2016-12-23
Thanks, will merge. Moving rest of discussion to [#240].
Related
Tickets:
#240That was not the complete fix. Hopefully, this is. Fixed in [59bdbf] (master) and [1d307b] (release-0_9_4)
Related
Commit: [1d307b]
Commit: [59bdbf]