]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix #1377 - check for EOVERFLOW when reading from DVB device.
authorAdam Sutton <dev@adamsutton.me.uk>
Mon, 5 Nov 2012 10:13:24 +0000 (10:13 +0000)
committerAdam Sutton <dev@adamsutton.me.uk>
Mon, 5 Nov 2012 10:13:24 +0000 (10:13 +0000)
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

index 5a8ccf95af1c568cdcff9a2fccd24a07dafa66b2..5324d7f76cf082a94477ed130dd6016d89cbce11 100644 (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;