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:
parent
a54427e28d
commit
6fc02ebd08
4
HISTORY
4
HISTORY
@ -2053,3 +2053,7 @@ Video Disk Recorder Revision History
|
||||
- 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
|
||||
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).
|
||||
|
4
config.h
4
config.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* 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
|
||||
@ -19,7 +19,7 @@
|
||||
#include "device.h"
|
||||
#include "tools.h"
|
||||
|
||||
#define VDRVERSION "1.1.28"
|
||||
#define VDRVERSION "1.1.29"
|
||||
|
||||
#define MAXPRIORITY 99
|
||||
#define MAXLIFETIME 99
|
||||
|
17
lirc.c
17
lirc.c
@ -6,7 +6,7 @@
|
||||
*
|
||||
* 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"
|
||||
@ -64,13 +64,14 @@ void cLircRemote::Action(void)
|
||||
bool ready = cFile::FileReady(f, timeout);
|
||||
int ret = ready ? safe_read(f, buf, sizeof(buf)) : -1;
|
||||
|
||||
if (ready) {
|
||||
if (ret <= 21) {
|
||||
esyslog("ERROR: lircd connection lost");
|
||||
close(f);
|
||||
f = -1;
|
||||
break;
|
||||
}
|
||||
if (ready && ret <= 0 ) {
|
||||
esyslog("ERROR: lircd connection lost");
|
||||
close(f);
|
||||
f = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (ready && ret > 21) {
|
||||
int count;
|
||||
char KeyName[LIRC_KEY_BUF];
|
||||
sscanf(buf, "%*x %x %29s", &count, KeyName); // '29' in '%29s' is LIRC_KEY_BUF-1!
|
||||
|
Loading…
Reference in New Issue
Block a user