summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-08-12 15:22:48 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-08-12 15:22:48 +0200
commit000ce0cf21f0eb8eb79156efdd9df615f06ce5f5 (patch)
tree9610a1ba686f7e1249709bd73a9a3ef4ee317b10 /remote.c
parent0ac6edbfc6a4128bc48372a2c913cc694f6a10eb (diff)
downloadvdr-000ce0cf21f0eb8eb79156efdd9df615f06ce5f5.tar.gz
vdr-000ce0cf21f0eb8eb79156efdd9df615f06ce5f5.tar.bz2
Made I/O more robust by handling EINTR0.9.1
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/remote.c b/remote.c
index db8fa870..eed91105 100644
--- a/remote.c
+++ b/remote.c
@@ -6,7 +6,7 @@
*
* Ported to LIRC by Carsten Koch <Carsten.Koch@icem.de> 2000-06-16.
*
- * $Id: remote.c 1.23 2001/07/27 10:17:19 kls Exp $
+ * $Id: remote.c 1.24 2001/08/12 15:07:26 kls Exp $
*/
#include "remote.h"
@@ -199,7 +199,7 @@ int cRcIoRCU::ReceiveByte(int TimeoutMs)
// Returns the byte if one was received within a timeout, -1 otherwise
if (cFile::FileReady(f, TimeoutMs)) {
unsigned char b;
- if (read(f, &b, 1) == 1)
+ if (safe_read(f, &b, 1) == 1)
return b;
else
LOG_ERROR;
@@ -436,7 +436,7 @@ void cRcIoLIRC::Action(void)
LOCK_THREAD;
- if (cFile::FileReady(f, REPEATLIMIT) && read(f, buf, sizeof(buf)) > 21) {
+ if (cFile::FileReady(f, REPEATLIMIT) && safe_read(f, buf, sizeof(buf)) > 21) {
if (!receivedData) { // only accept new data the previous data has been fetched
int count;
sscanf(buf, "%*x %x %29s", &count, LastKeyName); // '29' in '%29s' is LIRC_KEY_BUF-1!