diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2013-10-29 16:03:43 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2013-10-29 16:03:43 +0100 |
commit | 26fbb921f5ad2ec824c407710aa28f73762ffa6b (patch) | |
tree | 5c398add3b2f80c6456d93a1d8dccf54c9d808c1 | |
parent | 589f5519d779a8b8c9e27e5d97e2d4dec5bbe6a9 (diff) | |
download | vdr-26fbb921f5ad2ec824c407710aa28f73762ffa6b.tar.gz vdr-26fbb921f5ad2ec824c407710aa28f73762ffa6b.tar.bz2 |
The LIRC remote control now connects to the socket even if it doesn't yet exist whe VDR is started
-rw-r--r-- | CONTRIBUTORS | 2 | ||||
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | lirc.c | 19 |
3 files changed, 14 insertions, 11 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 165fbbbd..897500ba 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2858,6 +2858,8 @@ Lars Hanisch <dvb@flensrocker.de> for reporting an invalid line in channels.conf.terr for fixing handling '/' and '~' in recording file names in case DirectoryEncoding is used + for making the LIRC remote control connect to the socket even if it doesn't yet exist + when VDR is started Alex Lasnier <alex@fepg.org> for adding tuning support for ATSC devices @@ -8032,7 +8032,7 @@ Video Disk Recorder Revision History the last replayed recording (if any) by pressing Ok repeatedly in the Recordings menu. -2013-10-21: Version 2.1.3 +2013-10-29: Version 2.1.3 - Changed the return value of cPositioner::HorizonLongitude() to 0 in case the latitude of the antenna location is beyond +/-81 degrees. @@ -8044,3 +8044,5 @@ Video Disk Recorder Revision History user is prompted for confirmation to overwrite it (suggested by Rolf Ahrenberg). - Revoked "Added maximum signal strength value for TechniSat SkyStar 2 DVB-S rev 2.3P" because it broke things for the "TechniSat AirStar 2" DVB-T card. +- The LIRC remote control now connects to the socket even if it doesn't yet exist when + VDR is started (thanks to Lars Hanisch). @@ -6,7 +6,7 @@ * * LIRC support added by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16. * - * $Id: lirc.c 3.1 2013/08/22 09:22:14 kls Exp $ + * $Id: lirc.c 3.2 2013/10/29 12:32:12 kls Exp $ */ #include "lirc.h" @@ -21,11 +21,9 @@ cLircRemote::cLircRemote(const char *DeviceName) { addr.sun_family = AF_UNIX; strcpy(addr.sun_path, DeviceName); - if (Connect()) { - Start(); - return; - } - f = -1; + if (!Connect()) + f = -1; + Start(); } cLircRemote::~cLircRemote() @@ -67,14 +65,15 @@ void cLircRemote::Action(void) bool repeat = false; int timeout = -1; - while (Running() && f >= 0) { + while (Running()) { - bool ready = cFile::FileReady(f, timeout); + bool ready = f >= 0 && cFile::FileReady(f, timeout); int ret = ready ? safe_read(f, buf, sizeof(buf)) : -1; - if (ready && ret <= 0 ) { + if (f < 0 || ready && ret <= 0) { esyslog("ERROR: lircd connection broken, trying to reconnect every %.1f seconds", float(RECONNECTDELAY) / 1000); - close(f); + if (f >= 0) + close(f); f = -1; while (Running() && f < 0) { cCondWait::SleepMs(RECONNECTDELAY); |