Re: [Libevent-users] How to read data coming from a POST request

2012-08-10 Thread Dave Hart
char *data; > evbuffer_copyout(in_evb, data, len); data is an uninitialized pointer. Perhaps char *data = malloc(len); would get you over this hump. Cheers, Dave Hart *** To unsubscribe, send an e-mail to majord...@fre

Re: [Libevent-users] how to handle SIGCHLD before going into dispatch

2012-08-10 Thread Dave Hart
Hi Yee, Your code has a race between the child and the parent. If you create the base and install the SIGCHLD handling before forking, the race will be cured. Cheers, Dave Hart *** To unsubscribe, send an e-mail to majord

Re: [Libevent-users] Deadlock when calling bufferevent_free from an other thread

2012-08-08 Thread Dave Hart
event base's loop. It's ugly to require clients to understand the deadlock risk of calling event_del() from a thread other than the one servicing the event base loop, but it provides the functionality needed for both scenarios. Cheers,

Re: [Libevent-users] using libEvent 2.x with Visual C++

2012-07-04 Thread Dave Hart
y welcome, though.) Have you tried providing OPENSSL_DIR in the environment to nmake? set OPENSSL_DIR=c:\openssl nmake or on its command line: nmake OPENSSL_DIR=c:\openssl My guess is either approach will work. Cheers, Dave Hart ***

Re: [Libevent-users] Crash in my simple multi-threaded evhttp app [code incl.]

2012-06-27 Thread Dave Hart
You could always fix evhttp's threading bugs, Mark may let you use his libevhtp code in doing so. I gather libevhtp isn't a direct drop-in backward-compatible evhttp replacement but could be with a bit of work. Cheers, Dave Hart On Thu, Jun 28, 2012 at 04:38 UTC, Julian Bui wrote: &g

[Libevent-users] optimize evutil_gettimeofday()'s Windows implementation

2012-06-15 Thread Dave Hart
ve mul + sub will be faster than modulo (division). I'm not actually using libevent on Windows at this point. Cheers, Dave Hart *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] event_base_dispatch returning -1 - help debugging

2012-06-12 Thread Dave Hart
cout << "event is still pending" << endl; > } > else > { > cout << "event is still pending" << endl; > } I suggest providing a complete, freestanding example that others can actually compile rath

Re: [Libevent-users] event_base_dispatch returning -1 - help debugging

2012-06-12 Thread Dave Hart
le I'm sure his assistance is valued by those he helps, in terms of the libevent project, Nick's talents are underutilized compared to situations where libevent bugs are exposed and corrected. Cheers, Dave Hart *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] build problem: 'make' will try to configure again

2012-04-03 Thread Dave Hart
source code management tools which don't preserve timestamps. Some projects provide a bootstrap script to touch the generated files in an order which results in generated files being newer than their sources (see /bootstrap in NTP tarballs). Libevent provides an autogen.s

Re: [Libevent-users] Different behavior of my code

2011-09-01 Thread Dave Hart
-1; } I am not sure when event_config_require_features() appeared, but the docs at libevent.org suggest it was in libevent 2.0. Good luck, Dave Hart *** To unsubscribe, send an e-mail to majord...@freehaven.net with

Re: [Libevent-users] Strange timeout scheduling in 1.4

2011-08-04 Thread Dave Hart
r than the mapped + TSC approaches, a sane threshold that's reasonably future-proof seems achievable. I'm not volunteering to do this, either, I'm afraid. Cheers, Dave Hart *** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-usersin the body.

Re: [Libevent-users] Adding ipv6 support.

2011-02-07 Thread Dave Hart
On Mon, Feb 7, 2011 at 17:53 UTC, Dave Hart wrote: > If you only care about IPv4 and IPv6 sockets, consider using a union > of the useful types: > > typedef struct union_saddr_tag { typedef union union_saddr_tag { ... Not enough coffee. Running the microwave to reheat it irritate

Re: [Libevent-users] Adding ipv6 support.

2011-02-07 Thread Dave Hart
en suggested you want to race not only connect(), but also any subsequent handshaking you can do to verify the connection is actually working, before aborting losing simultaneous attempts. Using libevent, it's even easier than in Mark's examples to issue parallel attempts, at least for UDP