1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed detecting broken connection to the LIRC daemon

This commit is contained in:
Klaus Schmidinger 2003-04-25 13:46:56 +02:00
parent a54427e28d
commit 6fc02ebd08
3 changed files with 15 additions and 10 deletions

View File

@ -2053,3 +2053,7 @@ Video Disk Recorder Revision History
- Implemented "pause live video". You can now press "Menu/Yellow" or "Pause" on - Implemented "pause live video". You can now press "Menu/Yellow" or "Pause" on
your remote control while watching live video to start an instant recording your remote control while watching live video to start an instant recording
of the current programme and immediately start replaying that recording. of the current programme and immediately start replaying that recording.
2003-04-25: Version 1.1.29
- Fixed detecting broken connection to the LIRC daemon (thanks to Ludwig Nussel).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: config.h 1.153 2003/04/13 14:02:02 kls Exp $ * $Id: config.h 1.154 2003/04/21 16:23:15 kls Exp $
*/ */
#ifndef __CONFIG_H #ifndef __CONFIG_H
@ -19,7 +19,7 @@
#include "device.h" #include "device.h"
#include "tools.h" #include "tools.h"
#define VDRVERSION "1.1.28" #define VDRVERSION "1.1.29"
#define MAXPRIORITY 99 #define MAXPRIORITY 99
#define MAXLIFETIME 99 #define MAXLIFETIME 99

17
lirc.c
View File

@ -6,7 +6,7 @@
* *
* LIRC support added by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16. * LIRC support added by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16.
* *
* $Id: lirc.c 1.4 2003/04/12 14:37:17 kls Exp $ * $Id: lirc.c 1.5 2003/04/25 13:45:15 kls Exp $
*/ */
#include "lirc.h" #include "lirc.h"
@ -64,13 +64,14 @@ void cLircRemote::Action(void)
bool ready = cFile::FileReady(f, timeout); bool ready = cFile::FileReady(f, timeout);
int ret = ready ? safe_read(f, buf, sizeof(buf)) : -1; int ret = ready ? safe_read(f, buf, sizeof(buf)) : -1;
if (ready) { if (ready && ret <= 0 ) {
if (ret <= 21) { esyslog("ERROR: lircd connection lost");
esyslog("ERROR: lircd connection lost"); close(f);
close(f); f = -1;
f = -1; break;
break; }
}
if (ready && ret > 21) {
int count; int count;
char KeyName[LIRC_KEY_BUF]; char KeyName[LIRC_KEY_BUF];
sscanf(buf, "%*x %x %29s", &count, KeyName); // '29' in '%29s' is LIRC_KEY_BUF-1! sscanf(buf, "%*x %x %29s", &count, KeyName); // '29' in '%29s' is LIRC_KEY_BUF-1!