From 37ed2c31e710c598e66bc602be18e893d216d48f Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 22 Jul 2001 14:46:45 +0200 Subject: Increased the buffer for key names received from LIRC --- CONTRIBUTORS | 5 ++++- HISTORY | 2 ++ remote.c | 4 ++-- remote.h | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 41a3b78b..4f2cb8e8 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -84,7 +84,10 @@ Paulo Manuel Martins Lopes Markus Lang and Ulrich Röder for patching the Diseqc code so that it doesn't send a Diseqc command if - the Diseqc value for a given channel is '0'. + the Diseqc value for a given channel is '0' Jean-Claude Repetto for translating the OSD texts to the French language + +Andre Valentin + for increasing the key name buffer size for LIRC diff --git a/HISTORY b/HISTORY index 68306de7..1ce09693 100644 --- a/HISTORY +++ b/HISTORY @@ -565,3 +565,5 @@ Video Disk Recorder Revision History - Fixed a possible crash in parsing incorrect lines in 'channels.conf'. - New channel settings for Premiere World (Dolby Digital PIDs not yet available). +- Increased the buffer for key names received from LIRC (thanks to Andre + Valentin). diff --git a/remote.c b/remote.c index 94024386..16a1412d 100644 --- a/remote.c +++ b/remote.c @@ -6,7 +6,7 @@ * * Ported to LIRC by Carsten Koch 2000-06-16. * - * $Id: remote.c 1.21 2001/02/04 19:17:59 kls Exp $ + * $Id: remote.c 1.22 2001/07/22 14:43:45 kls Exp $ */ #include "remote.h" @@ -439,7 +439,7 @@ void cRcIoLIRC::Action(void) if (cFile::FileReady(f, REPEATLIMIT) && read(f, buf, sizeof(buf)) > 21) { if (!receivedData) { // only accept new data the previous data has been fetched int count; - sscanf(buf, "%*x %x %7s", &count, LastKeyName); // '7' in '%7s' is LIRC_KEY_BUF-1! + sscanf(buf, "%*x %x %29s", &count, LastKeyName); // '29' in '%29s' is LIRC_KEY_BUF-1! int Now = time_ms(); if (count == 0) { strcpy(keyName, LastKeyName); diff --git a/remote.h b/remote.h index 659de1ac..bbdf2fac 100644 --- a/remote.h +++ b/remote.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: remote.h 1.14 2001/02/02 14:49:10 kls Exp $ + * $Id: remote.h 1.15 2001/07/22 14:42:59 kls Exp $ */ #ifndef __REMOTE_H @@ -81,7 +81,7 @@ public: class cRcIoLIRC : public cRcIoBase, private cThread { private: - enum { LIRC_KEY_BUF = 8, LIRC_BUFFER_SIZE = 128 }; + enum { LIRC_KEY_BUF = 30, LIRC_BUFFER_SIZE = 128 }; int f; char keyName[LIRC_KEY_BUF]; bool receivedData, receivedRepeat, receivedRelease; -- cgit v1.2.3