parent
8d58ace858
commit
716f0e5218
@ -0,0 +1,49 @@
|
|||||||
|
From 53cea64c606e3bb4622c74855d35fc57eeb2123e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alec Leamas <leamas.alec@gmail.com>
|
||||||
|
Date: Tue, 9 Aug 2016 16:29:17 +0200
|
||||||
|
Subject: [PATCH 02/10] NEWS, lirc.org/index.html: Fixes.
|
||||||
|
|
||||||
|
---
|
||||||
|
NEWS | 4 +++-
|
||||||
|
doc/lirc.org/index.html | 6 ++++++
|
||||||
|
2 files changed, 9 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/NEWS b/NEWS
|
||||||
|
index a379785..0261bd2 100644
|
||||||
|
--- a/NEWS
|
||||||
|
+++ b/NEWS
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-0.9.4b 15/8/16
|
||||||
|
+0.9.4b 9/8/16
|
||||||
|
* lircd-uinput: A multitude of fixes (#213, #211, #177). Adds new options.
|
||||||
|
* lirc_client: Fix "Can't redirect irsend output" (#207).
|
||||||
|
* lirc_client: read_string() not terminating buffer contents (#216)
|
||||||
|
@@ -8,6 +8,8 @@
|
||||||
|
* lircmd: Options, udev examples and manpage update.A
|
||||||
|
* lib: Add missing Makefile.am dep (#210).
|
||||||
|
* doc: Manpages and configuration guide fixes.
|
||||||
|
+ * build: Don't define docdir - autoconf defines docdir (#215).
|
||||||
|
+ * build: support runstatedir configure option (#212).
|
||||||
|
|
||||||
|
0.9.4a 22/6/16
|
||||||
|
* Fix syntax errors in systemd unit files (rhbz: 1350750).
|
||||||
|
diff --git a/doc/lirc.org/index.html b/doc/lirc.org/index.html
|
||||||
|
index 204d457..b0a1efa 100644
|
||||||
|
--- a/doc/lirc.org/index.html
|
||||||
|
+++ b/doc/lirc.org/index.html
|
||||||
|
@@ -432,6 +432,12 @@
|
||||||
|
<HR WIDTH="50%"><BR>
|
||||||
|
<UL TYPE="SQUARE">
|
||||||
|
<LI>
|
||||||
|
+ [9-Aug2016]
|
||||||
|
+ <P>
|
||||||
|
+ lirc-0.9.4b released.
|
||||||
|
+ </P>
|
||||||
|
+ </LI>
|
||||||
|
+ <LI>
|
||||||
|
[29-June2016]
|
||||||
|
<P>
|
||||||
|
lirc-0.9.4a released.
|
||||||
|
--
|
||||||
|
2.5.5
|
||||||
|
|
@ -0,0 +1,96 @@
|
|||||||
|
From 62b9172bf52584e0c621d0163052ccca9a240846 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Helen Foster <helen-foster@users.sourceforge.net>
|
||||||
|
Date: Sun, 14 Aug 2016 14:00:30 +0100
|
||||||
|
Subject: [PATCH 03/10] irtoy: improve error handling (#220).
|
||||||
|
|
||||||
|
Avoid double init. Avoid calling setPin or trying to send if irtoy
|
||||||
|
is not initialized (segfault).
|
||||||
|
---
|
||||||
|
plugins/irtoy.c | 28 ++++++++++++++++++++--------
|
||||||
|
1 file changed, 20 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/irtoy.c b/plugins/irtoy.c
|
||||||
|
index f6e81d7..f7a6feb 100644
|
||||||
|
--- a/plugins/irtoy.c
|
||||||
|
+++ b/plugins/irtoy.c
|
||||||
|
@@ -467,6 +467,9 @@ static int init_device(void)
|
||||||
|
IRTOY_MINFWVERSION,
|
||||||
|
dev->swVersion);
|
||||||
|
free(dev);
|
||||||
|
+ dev = NULL;
|
||||||
|
+ close(drv.fd);
|
||||||
|
+ tty_delete_lock();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
rec_buffer_init();
|
||||||
|
@@ -490,10 +493,15 @@ static int init(void)
|
||||||
|
"Additional irtoy device found: %s (ignored)";
|
||||||
|
const char* const MSG_FOUND = "irtoy device found on %s";
|
||||||
|
|
||||||
|
+ log_trace("irtoy: init");
|
||||||
|
if (drv.device == NULL) {
|
||||||
|
log_error("irtoy: NULL device.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
+ if (dev != NULL) {
|
||||||
|
+ log_debug("irtoy: init: irtoy already initialized");
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
if (strcmp(drv.device, "auto") != 0)
|
||||||
|
return init_device();
|
||||||
|
for (found = 0, i = 0; i <= 9; i++) {
|
||||||
|
@@ -516,6 +524,8 @@ static int init(void)
|
||||||
|
|
||||||
|
static int deinit(void)
|
||||||
|
{
|
||||||
|
+ log_trace("irtoy: deinit");
|
||||||
|
+
|
||||||
|
// IMPORTANT do not remove this reset. it is vital to return the
|
||||||
|
// irtoy to IRMAN mode.
|
||||||
|
// If we leave the irtoy in sample mode while no-one has the
|
||||||
|
@@ -527,14 +537,14 @@ static int deinit(void)
|
||||||
|
// sending the next one, while sample mode will keep streaming
|
||||||
|
// (and under fluorescent light it WILL stream..)
|
||||||
|
// triggering the problem
|
||||||
|
- setPin(openPin, 0);
|
||||||
|
- setPin(sendingPin, 0);
|
||||||
|
- setPin(receivePin, 0);
|
||||||
|
if (dev != NULL) {
|
||||||
|
+ setPin(openPin, 0);
|
||||||
|
+ setPin(sendingPin, 0);
|
||||||
|
+ setPin(receivePin, 0);
|
||||||
|
irtoy_reset(dev);
|
||||||
|
free(dev);
|
||||||
|
+ dev = NULL;
|
||||||
|
}
|
||||||
|
- dev = NULL;
|
||||||
|
|
||||||
|
close(drv.fd);
|
||||||
|
drv.fd = -1;
|
||||||
|
@@ -562,10 +572,6 @@ static int irtoy_send_double_buffered(unsigned char* signals, int length)
|
||||||
|
unsigned char reply[16];
|
||||||
|
int irtoyXmit;
|
||||||
|
|
||||||
|
- if (dev == NULL) {
|
||||||
|
- log_error("irtoy_send: irtoy not initialized");
|
||||||
|
- return 0;
|
||||||
|
- }
|
||||||
|
res = write(dev->fd, IRTOY_COMMAND_TXSTART, sizeof(IRTOY_COMMAND_TXSTART));
|
||||||
|
|
||||||
|
if (res != sizeof(IRTOY_COMMAND_TXSTART)) {
|
||||||
|
@@ -647,6 +653,12 @@ static int send(struct ir_remote* remote, struct ir_ncode* code)
|
||||||
|
lirc_t val;
|
||||||
|
int res;
|
||||||
|
|
||||||
|
+ log_trace("irtoy: send");
|
||||||
|
+
|
||||||
|
+ if (dev == NULL) {
|
||||||
|
+ log_error("irtoy: send: irtoy not initialized");
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
if (!send_buffer_put(remote, code))
|
||||||
|
return 0;
|
||||||
|
--
|
||||||
|
2.5.5
|
||||||
|
|
@ -1,63 +0,0 @@
|
|||||||
From 8e0e7b65dea3b9f71e8658f0e417fac6409b4c2c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
||||||
Date: Wed, 25 May 2016 16:34:55 +0200
|
|
||||||
Subject: [PATCH] lib: use proper linking method to avoid parallel build issue
|
|
||||||
|
|
||||||
Using <foo>_LDFLAGS = -l<library> is correct when <library> is an
|
|
||||||
external library. However, when it is built by the same package, and
|
|
||||||
especially in the same directory, this is wrong and can cause parallel
|
|
||||||
build issues. In lib/Makefile.am, there was:
|
|
||||||
|
|
||||||
libirrecord_la_LDFLAGS = -llirc
|
|
||||||
|
|
||||||
But the liblirc library is built in the same directory. Or, due to the
|
|
||||||
using of <foo>_LDFLAGS, make is not aware of the build dependency
|
|
||||||
between libirrecord and liblirc.
|
|
||||||
|
|
||||||
To solve this, <foo>_LIBADD should be used instead, as follows:
|
|
||||||
|
|
||||||
libirrecord_la_LIBADD = liblirc.la
|
|
||||||
|
|
||||||
This fixes parallel build issues seen by automated build tests
|
|
||||||
conducted by the Buildroot project, such as:
|
|
||||||
|
|
||||||
http://autobuild.buildroot.org/results/eb4/eb47d57de8182d25b1dacbf0ac3726ed20063d04/build-end.log
|
|
||||||
|
|
||||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
||||||
---
|
|
||||||
lib/Makefile.am | 8 +++++++-
|
|
||||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/lib/Makefile.am b/lib/Makefile.am
|
|
||||||
index ce5c94c..fc77a60 100644
|
|
||||||
--- a/lib/Makefile.am
|
|
||||||
+++ b/lib/Makefile.am
|
|
||||||
@@ -29,7 +29,7 @@ liblirc_la_SOURCES = config_file.c \
|
|
||||||
transmit.c \
|
|
||||||
util.c
|
|
||||||
|
|
||||||
-libirrecord_la_LDFLAGS = -llirc
|
|
||||||
+libirrecord_la_LIBADD = -llirc
|
|
||||||
libirrecord_la_SOURCES = irrecord.c
|
|
||||||
|
|
||||||
liblirc_client_la_LDFLAGS = -version-info 4:0:4
|
|
||||||
@@ -98,10 +98,16 @@ input_map.lo: lirc/input_map.inc
|
|
||||||
|
|
||||||
input_map.inc: lirc/input_map.inc
|
|
||||||
|
|
||||||
+if BSD
|
|
||||||
+lirc/input_map.inc:
|
|
||||||
+ touch $@
|
|
||||||
+ touch touch input_map.inc
|
|
||||||
+else
|
|
||||||
lirc/input_map.inc:
|
|
||||||
ln -s . lirc || :
|
|
||||||
$(top_srcdir)/tools/lirc-make-devinput -i > input_map.inc
|
|
||||||
$(top_srcdir)/tools/lirc-make-devinput -i > $@
|
|
||||||
+endif
|
|
||||||
|
|
||||||
checkfiles:
|
|
||||||
../git-tools/checkfiles $(SOURCES) $(HEADERS)
|
|
||||||
--
|
|
||||||
2.5.5
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
From 8cb5fd91935603536dcb0377ff91eb0ae477d19a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alec Leamas <leamas.alec@gmail.com>
|
||||||
|
Date: Thu, 18 Aug 2016 16:19:17 +0200
|
||||||
|
Subject: [PATCH 05/10] contrib: disable udev /dev/uinput rule.
|
||||||
|
|
||||||
|
---
|
||||||
|
contrib/97-lircd-uinput.rules | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/contrib/97-lircd-uinput.rules b/contrib/97-lircd-uinput.rules
|
||||||
|
index 12228a7..a554299 100644
|
||||||
|
--- a/contrib/97-lircd-uinput.rules
|
||||||
|
+++ b/contrib/97-lircd-uinput.rules
|
||||||
|
@@ -7,4 +7,4 @@ SUBSYSTEMS=="input",ATTRS{name}=="lircmd",SYMLINK+="lircmd"
|
||||||
|
# Make /dev/uinput accessible for the lirc group. A setfacl RUN would be
|
||||||
|
# better here, but seemingly does not work (?)
|
||||||
|
# An alternative is to use lircd-setup(8) to sun setfacl(1).
|
||||||
|
-KERNEL=="uinput",GROUP:="lirc",MODE:="0660"
|
||||||
|
+## KERNEL=="uinput",GROUP:="lirc",MODE:="0660"
|
||||||
|
--
|
||||||
|
2.5.5
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
From 33c188c38f5f89e704e4c775205e1d90ca55bc0d Mon Sep 17 00:00:00 2001
|
From 33c188c38f5f89e704e4c775205e1d90ca55bc0d Mon Sep 17 00:00:00 2001
|
||||||
From: Alec Leamas <leamas.alec@gmail.com>
|
From: Alec Leamas <leamas.alec@gmail.com>
|
||||||
Date: Sun, 21 Aug 2016 17:33:19 +0200
|
Date: Sun, 21 Aug 2016 17:33:19 +0200
|
||||||
Subject: [PATCH] lirc-setup: Fix crasher bugfix.
|
Subject: [PATCH 06/10] lirc-setup: Fix crasher bugfix.
|
||||||
|
|
||||||
Fixes https://retrace.fedoraproject.org/faf/reports/1166394/
|
Fixes https://retrace.fedoraproject.org/faf/reports/1166394/
|
||||||
---
|
---
|
@ -1,7 +1,8 @@
|
|||||||
From aa087cb999b7303d6f14d0928a84909d5bf29529 Mon Sep 17 00:00:00 2001
|
From aa087cb999b7303d6f14d0928a84909d5bf29529 Mon Sep 17 00:00:00 2001
|
||||||
From: Alec Leamas <leamas.alec@gmail.com>
|
From: Alec Leamas <leamas.alec@gmail.com>
|
||||||
Date: Thu, 18 Aug 2016 21:04:07 +0200
|
Date: Thu, 18 Aug 2016 21:04:07 +0200
|
||||||
Subject: [PATCH] contrib: Fix usb devices' acl permissions (rhbz #1364744).
|
Subject: [PATCH 07/10] contrib: Fix usb devices' acl permissions (rhbz
|
||||||
|
#1364744).
|
||||||
|
|
||||||
---
|
---
|
||||||
contrib/60-lirc.rules | 13 +++++++------
|
contrib/60-lirc.rules | 13 +++++++------
|
@ -0,0 +1,55 @@
|
|||||||
|
From f561c4b9e1ea8a225ae4431348529cd5b6b477d9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alec Leamas <leamas.alec@gmail.com>
|
||||||
|
Date: Tue, 23 Aug 2016 13:16:56 +0200
|
||||||
|
Subject: [PATCH 08/10] lircd: Retry temporary unavailable write sockets
|
||||||
|
(#221).
|
||||||
|
|
||||||
|
---
|
||||||
|
daemons/lircd.cpp | 21 +++++++++++++++++++--
|
||||||
|
1 file changed, 19 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp
|
||||||
|
index de2c341..2dc9029 100644
|
||||||
|
--- a/daemons/lircd.cpp
|
||||||
|
+++ b/daemons/lircd.cpp
|
||||||
|
@@ -115,6 +115,12 @@ int clock_gettime(int clk_id, struct timespec *t){
|
||||||
|
|
||||||
|
static const logchannel_t logchannel = LOG_APP;
|
||||||
|
|
||||||
|
+/** How long we sleep while waiting for busy write sockets. */
|
||||||
|
+static const int WRITE_SLEEP_US = 20000;
|
||||||
|
+
|
||||||
|
+/** How many times we retry busy write sockets. */
|
||||||
|
+static const int WRITE_RETRIES = 50;
|
||||||
|
+
|
||||||
|
struct peer_connection {
|
||||||
|
char* host;
|
||||||
|
unsigned short port;
|
||||||
|
@@ -338,11 +344,22 @@ static int oatoi(const char* s)
|
||||||
|
int write_socket(int fd, const char* buf, int len)
|
||||||
|
{
|
||||||
|
int done, todo = len;
|
||||||
|
+ int retries = WRITE_RETRIES;
|
||||||
|
|
||||||
|
while (todo) {
|
||||||
|
done = write(fd, buf, todo);
|
||||||
|
- if (done <= 0)
|
||||||
|
- return done;
|
||||||
|
+ if (done <= 0) {
|
||||||
|
+ log_perror_debug("Error in write_socket");
|
||||||
|
+ if (errno == EAGAIN || errno == EWOULDBLOCK) {
|
||||||
|
+ retries -= 1;
|
||||||
|
+ if (retries <= 0)
|
||||||
|
+ return done;
|
||||||
|
+ usleep(WRITE_SLEEP_US);
|
||||||
|
+ continue;
|
||||||
|
+ } else {
|
||||||
|
+ return done;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
buf += done;
|
||||||
|
todo -= done;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.5.5
|
||||||
|
|
@ -0,0 +1,57 @@
|
|||||||
|
From 9ad5f93a07be0bf4f645f16dbbf29e2e8cd3b871 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alec Leamas <leamas.alec@gmail.com>
|
||||||
|
Date: Tue, 23 Aug 2016 13:50:48 +0200
|
||||||
|
Subject: [PATCH 09/10] lircd: Warn for duplicate remote definitions (#222).
|
||||||
|
|
||||||
|
---
|
||||||
|
daemons/lircd.cpp | 20 ++++++++++++++++++++
|
||||||
|
1 file changed, 20 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp
|
||||||
|
index 2dc9029..8fd8336 100644
|
||||||
|
--- a/daemons/lircd.cpp
|
||||||
|
+++ b/daemons/lircd.cpp
|
||||||
|
@@ -70,6 +70,9 @@
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#include <string>
|
||||||
|
+#include <set>
|
||||||
|
+
|
||||||
|
#include "lirc_private.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_INT_GETGROUPLIST_GROUPS
|
||||||
|
@@ -540,6 +543,22 @@ static int setup_hardware(void)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void check_config_duplicates(const struct ir_remote* head)
|
||||||
|
+{
|
||||||
|
+ std::set<std::string> names;
|
||||||
|
+ const struct ir_remote* ir;
|
||||||
|
+ const char* const errmsg =
|
||||||
|
+ "Duplicate remotes \"%s\" found, problems ahead";
|
||||||
|
+
|
||||||
|
+ for (ir = head; ir != NULL; ir = ir->next) {
|
||||||
|
+ std::string name(ir->name);
|
||||||
|
+ if (names.count(name) == 1)
|
||||||
|
+ log_warn(errmsg, name.c_str())
|
||||||
|
+ else
|
||||||
|
+ names.insert(name);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
|
||||||
|
void config(void)
|
||||||
|
{
|
||||||
|
@@ -572,6 +591,7 @@ void config(void)
|
||||||
|
}
|
||||||
|
configfile = filename;
|
||||||
|
config_remotes = read_config(fd, configfile);
|
||||||
|
+ check_config_duplicates(config_remotes);
|
||||||
|
fclose(fd);
|
||||||
|
if (config_remotes == (void*)-1) {
|
||||||
|
log_error("reading of config file failed");
|
||||||
|
--
|
||||||
|
2.5.5
|
||||||
|
|
@ -0,0 +1,35 @@
|
|||||||
|
From b853e3d1bcc756206ffa1bc612996cd1597d53ea Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alec Leamas <leamas.alec@gmail.com>
|
||||||
|
Date: Tue, 23 Aug 2016 13:24:32 +0200
|
||||||
|
Subject: [PATCH 10/10] lirc-make-devinput: Fix that two remotes has the same
|
||||||
|
name (#222).
|
||||||
|
|
||||||
|
---
|
||||||
|
tools/lirc-make-devinput | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tools/lirc-make-devinput b/tools/lirc-make-devinput
|
||||||
|
index 3ae63ea..0598970 100755
|
||||||
|
--- a/tools/lirc-make-devinput
|
||||||
|
+++ b/tools/lirc-make-devinput
|
||||||
|
@@ -63,7 +63,7 @@ echo "# Date: $(date)"
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
begin remote
|
||||||
|
- name devinput
|
||||||
|
+ name devinput-64
|
||||||
|
bits 16
|
||||||
|
eps 30
|
||||||
|
aeps 100
|
||||||
|
@@ -89,7 +89,7 @@ echo "# generated by $(basename $0) (obsolete 32 bit version)"
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
begin remote
|
||||||
|
- name devinput
|
||||||
|
+ name devinput-32
|
||||||
|
bits 16
|
||||||
|
eps 30
|
||||||
|
aeps 100
|
||||||
|
--
|
||||||
|
2.5.5
|
||||||
|
|
Loading…
Reference in new issue