summaryrefslogtreecommitdiff
path: root/svdrp.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-03-23 16:17:39 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-03-23 16:17:39 +0100
commitc751c195c1a57e6738d402f5b4d42357b8e580d0 (patch)
treede7c66bb18cc0772d36fa9642ed7afc215f4538c /svdrp.c
parentef91debc4d181be5c34207cf32d127b3058f4697 (diff)
downloadvdr-c751c195c1a57e6738d402f5b4d42357b8e580d0.tar.gz
vdr-c751c195c1a57e6738d402f5b4d42357b8e580d0.tar.bz2
Improved usage of 'safe_write()'
Diffstat (limited to 'svdrp.c')
-rw-r--r--svdrp.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/svdrp.c b/svdrp.c
index 06f8ebbc..751a5c54 100644
--- a/svdrp.c
+++ b/svdrp.c
@@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection.
*
- * $Id: svdrp.c 1.34 2002/03/08 17:17:05 kls Exp $
+ * $Id: svdrp.c 1.35 2002/03/23 16:17:39 kls Exp $
*/
#include "svdrp.h"
@@ -340,16 +340,12 @@ bool cSVDRP::Send(const char *s, int length)
{
if (length < 0)
length = strlen(s);
- int wbytes = safe_write(file, s, length);
- if (wbytes == length)
- return true;
- if (wbytes < 0) {
+ if (safe_write(file, s, length) < 0) {
LOG_ERROR;
file.Close();
+ return false;
}
- else //XXX while...???
- esyslog(LOG_ERR, "Wrote %d bytes to client while expecting %d\n", wbytes, length);
- return false;
+ return true;
}
void cSVDRP::Reply(int Code, const char *fmt, ...)