mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Additional error log messages
This commit is contained in:
parent
abc6aa949c
commit
4f08e7d825
10
remote.c
10
remote.c
@ -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: remote.c 1.7 2000/05/07 09:28:18 kls Exp $
|
* $Id: remote.c 1.8 2000/06/17 17:43:05 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "remote.h"
|
#include "remote.h"
|
||||||
@ -74,13 +74,17 @@ int cRcIo::ReceiveByte(bool Wait)
|
|||||||
unsigned char b;
|
unsigned char b;
|
||||||
if (read(f, &b, 1) == 1)
|
if (read(f, &b, 1) == 1)
|
||||||
return b;
|
return b;
|
||||||
|
else
|
||||||
|
LOG_ERROR;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cRcIo::SendByteHandshake(unsigned char c)
|
bool cRcIo::SendByteHandshake(unsigned char c)
|
||||||
{
|
{
|
||||||
if (f >= 0 && write(f, &c, 1) == 1) {
|
if (f >= 0) {
|
||||||
|
int w = write(f, &c, 1);
|
||||||
|
if (w == 1) {
|
||||||
for (int reply = ReceiveByte(); reply >= 0;) {
|
for (int reply = ReceiveByte(); reply >= 0;) {
|
||||||
if (reply == c)
|
if (reply == c)
|
||||||
return true;
|
return true;
|
||||||
@ -95,6 +99,8 @@ bool cRcIo::SendByteHandshake(unsigned char c)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LOG_ERROR;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user