From 03ff9727564d991b40e0f0fb0bb3ea06d00d8e65 Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Mon, 5 Nov 2012 10:13:24 +0000 Subject: [PATCH] Fix #1377 - check for EOVERFLOW when reading from DVB device. This can be returned as a result of a failure to read quickly enough from the DVR device. This appears to happen quite regularly on channel zap for certain cards. It's non-fatal and the system will auto recover immediately. For now I've left the exit on other error in, but have added an error message so we know its happening (the biggest problem was this was happening silently before). This may also relate to #1134, so might be worth back porting to 3.2. --- src/dvb/dvb_adapter.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/dvb/dvb_adapter.c b/src/dvb/dvb_adapter.c index 5a8ccf95..5324d7f7 100644 --- a/src/dvb/dvb_adapter.c +++ b/src/dvb/dvb_adapter.c @@ -906,8 +906,16 @@ dvb_adapter_input_dvr(void *aux) if (c < 0) { if (errno == EAGAIN || errno == EINTR) continue; - else + else if (errno == EOVERFLOW) { + tvhlog(LOG_WARNING, "dvb", "\"%s\" read() EOVERFLOW", + tda->tda_identifier); + continue; + } else { + // TODO: should we try to recover? + tvhlog(LOG_ERR, "dvb", "\"%s\" read() error %d", + tda->tda_identifier, errno); break; + } } r += c;