Changeset 5192 for trunk/module-cccam.c
- Timestamp:
- 05/07/11 18:08:39 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-cccam.c
r5190 r5192 422 422 423 423 int32_t cc_recv_to(struct s_client *cl, uint8_t *buf, int32_t len) { 424 fd_set fds;425 struct timeval timeout;426 424 int32_t rc; 427 428 timeout.tv_sec = 2; 429 timeout.tv_usec = 0; 430 431 while (1) { 432 FD_ZERO(&fds); 433 FD_SET(cl->udp_fd, &fds); 434 435 rc=select(cl->udp_fd+1, &fds, 0, 0, &timeout); 436 if (rc<0) { 425 struct pollfd pfd; 426 427 while (1) { 428 pfd.fd = cl->udp_fd; 429 pfd.events = POLLIN | POLLPRI; 430 431 rc = poll(&pfd, 1, 2000); 432 433 if (rc < 0) { 437 434 if (errno==EINTR) continue; 438 435 return(-1); //error!! 439 436 } 440 437 441 if (FD_ISSET(cl->udp_fd,&fds))438 if (rc == 1) 442 439 break; 443 440 return (-2); //timeout!!
Note:
See TracChangeset
for help on using the changeset viewer.