summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xine_input_vdr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xine_input_vdr.c b/xine_input_vdr.c
index 18bcdbaf..9f05862e 100644
--- a/xine_input_vdr.c
+++ b/xine_input_vdr.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: xine_input_vdr.c,v 1.245 2009-03-17 18:07:13 rofafor Exp $
+ * $Id: xine_input_vdr.c,v 1.246 2009-03-17 20:03:30 rofafor Exp $
*
*/
@@ -3552,14 +3552,15 @@ static int vdr_plugin_read_net_tcp(vdr_input_plugin_t *this)
}
if (read_buffer) {
- if (read_buffer->size && this->control_running && result == XIO_TIMEOUT && (++retries < 10)) {
+ int cnt = read_buffer->size;
+ if (cnt && this->control_running && result == XIO_TIMEOUT && (++retries < 10)) {
LOGMSG("TCP: Warning: long delay (>500ms) !");
goto retry;
}
read_buffer->free_buffer(read_buffer);
read_buffer = NULL;
- if (this->fd_data >= 0 && result == XIO_TIMEOUT) {
+ if (cnt && this->fd_data >= 0 && result == XIO_TIMEOUT) {
LOGMSG("TCP: Delay too long, disconnecting");
this->control_running = 0;
return XIO_ERROR;