Don't hardcode lirc socket path in the sky plugin
Commit Message
Hello,
The attached patch avoids hardcoded lirc socket path in the sky plugin, making
it use the value from Make.config by default. The patch is against 1.6.0-2
but appears to apply cleanly to 1.7.10 as well.
Comments
On 22.11.2009 22:09, Ville Skyttä wrote:
> Hello,
>
> The attached patch avoids hardcoded lirc socket path in the sky plugin, making
> it use the value from Make.config by default. The patch is against 1.6.0-2
> but appears to apply cleanly to 1.7.10 as well.
The 'sky' plugin will no longer be part of the VDR source as of version 1.7.11.
Klaus
@@ -41,7 +41,8 @@ PACKAGE = vdr-$(ARCHIVE)
INCLUDES += -I$(VDRDIR)/include
-DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
+LIRC_DEVICE ?= /dev/lircd
+DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DLIRC_DEVICE=\"$(LIRC_DEVICE)\"
### The object files (add further files here):
@@ -88,7 +88,7 @@ cDigiboxDevice::cDigiboxDevice(void)
apid = vpid = 0;
struct sockaddr_un addr;
addr.sun_family = AF_UNIX;
- strn0cpy(addr.sun_path, "/dev/lircd", sizeof(addr.sun_path));//XXX parameter???
+ strn0cpy(addr.sun_path, LIRC_DEVICE, sizeof(addr.sun_path));//XXX parameter???
fd_lirc = socket(AF_UNIX, SOCK_STREAM, 0);
if (fd_lirc >= 0) {
if (connect(fd_lirc, (struct sockaddr *)&addr, sizeof(addr)) < 0) {