]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
linuxdvb: appears some tuners are not supporting FE_GET_EVENT
authorAdam Sutton <dev@adamsutton.me.uk>
Thu, 22 Jan 2015 15:12:25 +0000 (15:12 +0000)
committerAdam Sutton <dev@adamsutton.me.uk>
Thu, 22 Jan 2015 15:12:25 +0000 (15:12 +0000)
This results in a terminal lockup as the ioctl() will loop indefinitely,
testing for != -1 was always a bad idea!

src/input/mpegts/linuxdvb/linuxdvb_frontend.c

index 286534ca0e864fc4ec7cc694e0430a00460e64c1..84a83ec09436882fd6b5dbc000970c5f9e1ecec8 100644 (file)
@@ -1328,7 +1328,7 @@ linuxdvb_frontend_tune0
 
   /* discard stale events */
   while (1) {
-    if (ioctl(lfe->lfe_fe_fd, FE_GET_EVENT, &ev) == -1)
+    if (ioctl(lfe->lfe_fe_fd, FE_GET_EVENT, &ev) < 0)
       break;
   }