Changeset 2798
- Timestamp:
- 07/21/10 19:59:43 (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam-simples.c
r2797 r2798 507 507 fd_set rfds; 508 508 fd_set erfds; 509 int select_ret ;509 int select_ret = 0; 510 510 int in_fd; 511 511 … … 518 518 FD_SET(in_fd, &erfds); 519 519 520 select_ret = select(in_fd+1, &rfds, NULL, &erfds, NULL); 521 if(select_ret==-1) 522 { 523 cs_log("ERROR reading from fd %d select_ret=%i, errno=%d",in_fd, select_ret, errno); 524 return 0; 525 } 526 520 while (select_ret <= 0) 521 { 522 select_ret = select(in_fd+1, &rfds, NULL, &erfds, NULL); 523 if (select_ret==-1) 524 { 525 cs_log("ERROR reading from fd %d select_ret=%i, errno=%d",in_fd, select_ret, errno); 526 if (errno == EINTR) //4 527 continue; 528 return 0; 529 } 530 if (select_ret==0) 531 return 0; 532 } 533 527 534 if (FD_ISSET(in_fd, &erfds)) 528 535 { -
trunk/oscam.c
r2795 r2798 1462 1462 tv.tv_usec = (timeout_ms % 1000) * 1000L; 1463 1463 1464 if (select(out_fd + 1, NULL, &wfds, &ewfds, &tv) == -1) { 1465 cs_log("pipe_WaitToWrite() error on fd=%d, select_ret=-1, errno=%d %s", out_fd, errno, strerror(errno)); 1466 return 0; 1464 int select_ret = 0; 1465 while (select_ret <= 0) 1466 { 1467 select_ret = select(out_fd + 1, NULL, &wfds, &ewfds, &tv); 1468 if (select_ret==-1) { 1469 cs_log("pipe_WaitToWrite() error on fd=%d, select_ret=-1, errno=%d %s", out_fd, errno, strerror(errno)); 1470 if (errno == EINTR) //4 1471 continue; 1472 return 0; 1473 } 1474 if (select_ret==0) 1475 return 0; 1467 1476 } 1468 1477 … … 2216 2225 } 2217 2226 else if (res < 0) { 2227 if (errno == EINTR) 2228 continue; 2218 2229 cs_debug_mask(D_TRACE, "get best reader: failed!"); 2219 2230 return; //failed
Note:
See TracChangeset
for help on using the changeset viewer.