Changeset 1575
- Timestamp:
- 06/18/08 17:09:18 (4 months ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/cherokee/socket.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r1574 r1575 1 1 2008-06-18 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * cherokee/socket.c (cherokee_socket_sendfile): This patch fixes 4 and simplfies the sendfile() support of MacOS X. 2 5 3 6 * cherokee/Makefile.am (distclean-local): It has to clean the two cherokee/trunk/cherokee/socket.c
r1446 r1575 1447 1447 1448 1448 #elif DARWIN_SENDFILE_API 1449 int re; 1450 struct sf_hdtr hdr; 1451 struct iovec hdtrl; 1452 off_t _sent = size; 1453 1454 hdr.headers = &hdtrl; 1455 hdr.hdr_cnt = 1; 1456 hdr.trailers = NULL; 1457 hdr.trl_cnt = 0; 1458 1459 hdtrl.iov_base = NULL; 1460 hdtrl.iov_len = 0; 1449 int re; 1450 off_t _sent = size; 1461 1451 1462 1452 /* MacOS X: BSD-like System Call … … 1471 1461 *offset, /* off_t offset */ 1472 1462 &_sent, /* off_t *len */ 1473 &hdr, /* struct sf_hdtr *hdtr */1463 NULL, /* struct sf_hdtr *hdtr */ 1474 1464 0); /* int flags */ 1475 1465 } while (re == -1 && errno == EINTR); … … 1478 1468 switch (errno) { 1479 1469 case EAGAIN: 1480 #if defined(EWOULDBLOCK) && (EWOULDBLOCK != EAGAIN) 1481 case EWOULDBLOCK: 1482 #endif 1483 if (*sent < 1) 1470 /* It might have sent some information 1471 */ 1472 if (_sent <= 0) 1484 1473 return ret_eagain; 1485 1486 /* else it's ok, something has been sent.1487 */1488 1474 break; 1489 1475 case ENOSYS: