]> granicus.if.org Git - libevent/commit
Solaris sendfile: correctly detect amount of data sent
authorMichael Herf <herf@pobox.com>
Mon, 15 Aug 2011 17:39:10 +0000 (13:39 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 15 Aug 2011 17:39:10 +0000 (13:39 -0400)
commit643922e9079c2d2b5dd534cda8ca94f43025889c
tree0009128127c4ee7de343f65aacefb74c3423c789
parentaff6ba15a1712567ca65d3d4d0b6f0c2fabc672b
Solaris sendfile: correctly detect amount of data sent

Original message:

   Solaris sendfile seems to fail when sending moderately large (<1GB)
   files. Not a 32/64 problem, but a buffer problem.

   Anyone else ever try this? It is definitely broken in http-server.c.

   It seems to be broken in the following way:

   When sendfile sends partial data (EAGAIN, would block), "res" is
   always -1, rather than the amount sent.

   Here's a patch that reads from the "offset" pointer instead to
   discover what was sent. This seems to work:
buffer.c