Increased the buffer for key names received from LIRC

This commit is contained in:
Klaus Schmidinger 2001-07-22 14:46:45 +02:00
parent 668606c38c
commit 37ed2c31e7
4 changed files with 10 additions and 5 deletions

View File

@ -84,7 +84,10 @@ Paulo Manuel Martins Lopes <pmml@netvita.pt>
Markus Lang <markus.lang@nissan-db.de> 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 <jc@repetto.org>
for translating the OSD texts to the French language
Andre Valentin <av2000@topmail.de>
for increasing the key name buffer size for LIRC

View File

@ -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).

View File

@ -6,7 +6,7 @@
*
* Ported to LIRC by Carsten Koch <Carsten.Koch@icem.de> 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);

View File

@ -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;