From: Adam Sutton Date: Mon, 5 Nov 2012 10:13:24 +0000 (+0000) Subject: Fix #1377 - check for EOVERFLOW when reading from DVB device. X-Git-Tag: v3.5~294^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03ff9727564d991b40e0f0fb0bb3ea06d00d8e65;p=thirdparty%2Ftvheadend.git 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. --- diff --git a/src/dvb/dvb_adapter.c b/src/dvb/dvb_adapter.c index 5a8ccf95a..5324d7f76 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;