0.9.4c-7 - add missing patches

epel8
Alec Leamas 8 years ago
parent 6530b2085f
commit 26514dbad2

@ -0,0 +1,25 @@
From 614ea57ffc672359b0353ecdfd471dcd18e700d4 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@gmail.com>
Date: Fri, 30 Dec 2016 20:05:50 +0100
Subject: [PATCH] build: Include config.h in installed headers (#250).
---
Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 1e41cab..868ad7f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -51,7 +51,7 @@ dist_pkgconfig_DATA = lirc.pc lirc-driver.pc
headerdir = $(includedir)/lirc
nobase_header_HEADERS = include/media/lirc.h
-header_HEADERS = paths.h drivers/irpipe/irpipe.h
+header_HEADERS = paths.h config.h drivers/irpipe/irpipe.h
install-data-hook:
$(SED) -i -e '/^plugindir/s|/usr/lib|$(libdir)|' \
--
2.7.4

@ -0,0 +1,41 @@
From f105ffaec389c7765549cac834aaed144cdebdc8 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@gmail.com>
Date: Tue, 3 Jan 2017 17:26:31 +0100
Subject: [PATCH 20/21] lircd: Fix segfault in SET_INPUTLOG without arguments
(#252).
---
daemons/lircd.cpp | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp
index 4e9162a..64cbc0c 100644
--- a/daemons/lircd.cpp
+++ b/daemons/lircd.cpp
@@ -1687,13 +1687,17 @@ static int set_inputlog(int fd, char* message, char* arguments)
FILE* f;
int r;
- r = sscanf(arguments, "%128s", buff);
- if (r != 1) {
- return send_error(fd, message,
- "Illegal argument (protocol error): %s",
- arguments);
+ if (arguments) {
+ r = sscanf(arguments, "%128s", buff);
+ if (r != 1) {
+ return send_error(
+ fd, message,
+ "Illegal argument (protocol error): %s",
+ arguments
+ );
+ }
}
- if (strcasecmp(buff, "null") == 0) {
+ if (!arguments || strcasecmp(buff, "null") == 0) {
rec_buffer_set_logfile(NULL);
return send_success(fd, message);
}
--
2.7.4

@ -0,0 +1,66 @@
From 7c3caa5b02e6907d44d9d04fe0dfc93974b5d32c Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@gmail.com>
Date: Mon, 2 Jan 2017 18:43:14 +0100
Subject: [PATCH 21/21] ircat: Fix option parsing bug + empty conditions
(#251).
The --command/-c option was not parsed correctly, despite that
it seemed to work. lirc_code2char is not guarenteed to return
NULL if there is no more data, it could just be empty.
---
tools/ircat.cpp | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/tools/ircat.cpp b/tools/ircat.cpp
index 8d93f9b..b41dece 100644
--- a/tools/ircat.cpp
+++ b/tools/ircat.cpp
@@ -58,6 +58,7 @@ int main(int argc, char* argv[])
{
struct lirc_config* config;
char* config_file = NULL;
+ int r;
while (1) {
int c;
@@ -67,7 +68,7 @@ int main(int argc, char* argv[])
{ "version", no_argument, NULL, 'v' },
{ 0, 0, 0, 0 }
};
- c = getopt_long(argc, argv, "chv", long_options, NULL);
+ c = getopt_long(argc, argv, "c:hv", long_options, NULL);
if (c == -1)
break;
switch (c) {
@@ -94,20 +95,23 @@ int main(int argc, char* argv[])
if (lirc_init(argv[argc - 1], 1) == -1)
exit(EXIT_FAILURE);
- if (lirc_readconfig(config_file, &config, NULL) == 0) {
+ r = lirc_readconfig(config_file, &config, NULL);
+ if (r == 0) {
char* code;
char* c;
- int ret;
+ int r;
while (lirc_nextcode(&code) == 0) {
- if (code == NULL)
+ if (code == NULL || !*code)
continue;
- while ((ret = lirc_code2char(config, code, &c)) == 0 && c != NULL) {
+ while ((r = lirc_code2char(config, code, &c)) == 0) {
+ if (c == NULL || !*c)
+ break;
printf("%s\n", c);
fflush(stdout);
}
free(code);
- if (ret == -1)
+ if (r == -1)
break;
}
lirc_freeconfig(config);
--
2.7.4
Loading…
Cancel
Save