Changeset 2785
- Timestamp:
- 07/19/10 19:06:31 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam.c
r2782 r2785 1445 1445 /* 1446 1446 * Check if a fd is ready for a write (for pipes). 1447 * retry twice in case of an error (so it could take 3 x timeout_ms in case of a hard error to return)1448 */ 1447 * Select version 1448 *//* 1449 1449 int pipe_WaitToWrite (int out_fd, unsigned timeout_ms) 1450 1450 { … … 1478 1478 1479 1479 return 1; 1480 }*/ 1481 1482 /* 1483 * Check if a fd is ready for a write (for pipes). 1484 * Poll version 1485 */ 1486 int pipe_WaitToWrite (int fd, unsigned timeout_ms) 1487 { 1488 struct pollfd pfds; 1489 1490 pfds.fd = fd; 1491 pfds.events = POLLOUT; 1492 pfds.revents = 0; 1493 if (poll(&pfds, 1, timeout_ms) < 1) { 1494 cs_log("pipe_WaitToWrite() error on fd=%d, errno=%d, %s", fd, errno, strerror(errno)); 1495 return 0; 1496 } 1497 return 1; 1480 1498 } 1481 1499
Note:
See TracChangeset
for help on using the changeset viewer.