Re: [Libevent-users] off_t confusion

2011-08-15 Thread Michael Herf
wson wrote: On Thu, Aug 11, 2011 at 2:06 PM, Michael Herf wrote: I'm compiling libevent on Solaris. ev_off_t appears to be #define'd as off_t on UNIX machines ("#define ev_off_t off_t" in util.h). However, on this machine, off_t is first defined in *stdio.h*! Additionally, my app

Re: [Libevent-users] sendfile on solaris

2011-08-15 Thread Michael Herf
Looks good, and I agree the BSD code wasn't broken. :) On 8/15/2011 10:39 AM, Nick Mathewson wrote: On Thu, Aug 11, 2011 at 5:16 PM, Michael Herf wrote: In addition to my note about 64-bit offsets earlier: Solaris sendfile seems to fail when sending moderately large (<1GB) files. Not

[Libevent-users] sendfile on solaris

2011-08-11 Thread Michael Herf
In addition to my note about 64-bit offsets earlier: 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 s

[Libevent-users] off_t confusion

2011-08-11 Thread Michael Herf
I'm compiling libevent on Solaris. ev_off_t appears to be #define'd as off_t on UNIX machines ("#define ev_off_t off_t" in util.h). However, on this machine, off_t is first defined in *stdio.h*! Additionally, my app uses the following defines to make stdio 64-bit aware: -D_LARGE

Re: [Libevent-users] workers for evhttp (was stable, now not!)

2011-05-23 Thread Michael Herf
Nick Mathewson wrote: 1. I added BEV_OPT_THREADSAFE in evhttp_connection_base_new (evcon->bufev = We won't want to do this unconditionally: not everybody will want the overhead of locking in an evhttp that isn't going to be used in multiple threads. Maybe evthread_use_pthreads() could

Re: [Libevent-users] workers for evhttp (was stable, now not!)

2011-05-21 Thread Michael Herf
get a write callback */ > bufferevent_enable(evcon->bufev, EV_WRITE); > 2370c2392,2400 < evhttp_send(req, databuf); --- > if (req->evcon && req->evcon->bufev) { > struct bufferevent *bev = req->evcon->bufev; > > buffereve

[Libevent-users] workers for evhttp (was stable, now not!)

2011-05-20 Thread Michael Herf
I have a server using evhttp, which was running quite stably on 2.0.8. It uses a pthreads-based worker pool, but accepts http connections in the network thread, using one event base. On 2.0.10 and 2.0.11 things are now crashing or locking very quickly. The code to startup the server in the net

[Libevent-users] 14k vprintf evbuffer on solaris

2010-09-29 Thread Michael Herf
I'm compiling libevent-2.0.7-rc on my Linux and OpenSolaris box. I'm seeing a bug that happens on OpenSolaris only. When I make an evbuffer and call "evbuffer_add_vprintf" to add more than ~14k to it (many small writes, few bytes at a time), the Solaris version of the code fails and sends 0 by