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.
This commit is contained in:
Adam Sutton 2012-11-05 10:13:24 +00:00
parent 4515f5a2d1
commit 03ff972756

View file

@ -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;