Re: [Libevent-users] Timerout procedure can't enter twice

2012-09-11 Thread Michael
Thanks, it works. Michael On Tue, Sep 11, 2012 at 3:57 PM, Nick Mathewson wrote: > On Tue, Sep 11, 2012 at 5:54 PM, Michael wrote: > > Hi , > > > > I'm using libevent to create timer procedure. > > > > The attached program will call the timeout function a

[Libevent-users] Timerout procedure can't enter twice

2012-09-11 Thread Michael
Hi , I'm using libevent to create timer procedure. The attached program will call the timeout function at the first time. But it won't call the timeout function after I rewrite the timer. Attached please find the test code. Is there anything I'm missing ? Thanks! Michael

Re: [Libevent-users] Program halt after add event

2012-09-11 Thread Michael
Hi , Thanks! Still the same problem even if I use tv.tv_sec=2;tv.tv_usec=0 . Michael On Tue, Sep 11, 2012 at 11:37 AM, Nick Mathewson wrote: > On Tue, Sep 11, 2012 at 1:28 PM, Michael wrote: > > Hi, > > > > Thanks! > > > > Attached please find the test cod

Re: [Libevent-users] Program halt after add event

2012-09-11 Thread Michael
debug message, and restart2 also can't execute to line 101 to print the debug message . If you don't rewrite the timer in timeout_cb()(comment out line58-line63), it won't execute to line 101 until it executed the timeout_cb() Michael On Tue, Sep 11, 2012 at 11:08 AM, Nick Mathewson wro

[Libevent-users] Program halt after add event

2012-09-06 Thread Michael
Hi, I want use libevent as timer management tool in our program. Our program is multi-thread , and each thread will use some timer. I can enter into the call back function after I called the following functions: event_assign(), event_add(), event_base_dispatch() , it works fine. But I notice

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

Re: [Libevent-users] evhttp server on unix socket

2010-12-28 Thread Michael Lenaghan
On Wed, Dec 1, 2010 at 1:47 AM, Basile Starynkevitch wrote: > > > Hi, is it possible to bind an HTTP server on unix socket instead of > > address and port (int evhttp_bind_socket > > I don't know fur sure, and I believe it should require some patch. > > However, I am interested to understand why y

[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

[Libevent-users] libevent with python segfaulting

2010-08-01 Thread Michael Gale
? Thanks Michael