Update of /cvsroot/dvbtools/dvbtune
In directory sc8-pr-cvs1:/tmp/cvs-serv14331
Modified Files:
dvbtune.c tune.c
Log Message:
Increase timeouts and ignore EOVERFLOW errors - patch by Andrew de Quincey
Index: dvbtune.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbtune/dvbtune.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** dvbtune.c 22 Oct 2002 17:32:39 -0000 1.16
--- dvbtune.c 16 Jan 2003 07:49:44 -0000 1.17
***************
*** 698,702 ****
ufd.fd=fd_nit;
ufd.events=POLLPRI;
! if (poll(&ufd,1,5000) < 0 ) {
fprintf(stderr,"TIMEOUT on read from fd_nit\n");
close(fd_nit);
--- 698,702 ----
ufd.fd=fd_nit;
ufd.events=POLLPRI;
! if (poll(&ufd,1,10000) < 0 ) {
fprintf(stderr,"TIMEOUT on read from fd_nit\n");
close(fd_nit);
***************
*** 777,781 ****
ufd.fd=fd_pmt;
ufd.events=POLLPRI;
! if (poll(&ufd,1,2000) < 0) {
fprintf(stderr,"TIMEOUT reading from fd_pmt\n");
close(fd_pmt);
--- 777,781 ----
ufd.fd=fd_pmt;
ufd.events=POLLPRI;
! if (poll(&ufd,1,10000) < 0) {
fprintf(stderr,"TIMEOUT reading from fd_pmt\n");
close(fd_pmt);
***************
*** 865,869 ****
ufd.fd=fd_pat;
ufd.events=POLLPRI;
! if (poll(&ufd,1,2000) < 0) {
fprintf(stderr,"TIMEOUT reading from fd_pat\n");
close(fd_pat);
--- 865,869 ----
ufd.fd=fd_pat;
ufd.events=POLLPRI;
! if (poll(&ufd,1,10000) < 0) {
fprintf(stderr,"TIMEOUT reading from fd_pat\n");
close(fd_pat);
Index: tune.c
===================================================================
RCS file: /cvsroot/dvbtools/dvbtune/tune.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** tune.c 12 Oct 2002 11:59:31 -0000 1.14
--- tune.c 16 Jan 2003 07:49:44 -0000 1.15
***************
*** 27,30 ****
--- 27,31 ----
#include <unistd.h>
#include <error.h>
+ #include <errno.h>
#ifdef NEWSTRUCT
***************
*** 175,178 ****
--- 176,180 ----
struct dvb_frontend_info fe_info;
struct pollfd pfd[1];
+ int status;
if (ioctl(fd_frontend,FE_SET_FRONTEND,feparams) < 0) {
***************
*** 190,196 ****
if (pfd[0].revents & POLLIN){
fprintf(stderr,"Getting frontend event\n");
! if ( ioctl(fd_frontend, FE_GET_EVENT, &event) < 0){
! perror("FE_GET_EVENT");
! return -1;
}
}
--- 192,200 ----
if (pfd[0].revents & POLLIN){
fprintf(stderr,"Getting frontend event\n");
! if (status = ioctl(fd_frontend, FE_GET_EVENT, &event) < 0){
! if (status != -EOVERFLOW) {
! perror("FE_GET_EVENT");
! return -1;
! }
}
}
|