diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2001-04-01 14:13:42 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2001-04-01 14:13:42 +0200 |
commit | ab626eecd36217d15f9bee3e7e82100ca93c16d1 (patch) | |
tree | 51b709d49c09550fe3f5b274c182bc34cdcfdfe0 /tools.c | |
parent | 28130daef7b11beeafaf0c59dd45e8f0aafd6d5b (diff) | |
download | vdr-ab626eecd36217d15f9bee3e7e82100ca93c16d1.tar.gz vdr-ab626eecd36217d15f9bee3e7e82100ca93c16d1.tar.bz2 |
SVDRP now also works with clients that don't do line buffering
Diffstat (limited to 'tools.c')
-rw-r--r-- | tools.c | 23 |
1 files changed, 1 insertions, 22 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 1.31 2001/03/03 13:25:00 kls Exp $ + * $Id: tools.c 1.32 2001/04/01 14:13:36 kls Exp $ */ #define _GNU_SOURCE @@ -369,27 +369,6 @@ void cFile::Close(void) } } -int cFile::ReadString(char *Buffer, int Size) -{ - int rbytes = 0; - bool wait = true; - - while (Ready(wait)) { - int n = read(f, Buffer + rbytes, 1); - if (n == 0) - break; // EOF - if (n < 0) { - LOG_ERROR; - return -1; - } - rbytes += n; - if (rbytes == Size || Buffer[rbytes - 1] == '\n') - break; - wait = false; - } - return rbytes; -} - bool cFile::Ready(bool Wait) { return f >= 0 && AnyFileReady(f, Wait ? 1000 : 0); |