Re: [Libevent-users] Error in evthread_pthread.c

2012-08-20 Thread Chernyshev Vyacheslav
21.08.12, 2:04, Nick Mathewson wrote: What about the initialization in evthread_use_pthreads() ? Is there some reason that's not happening, or not happening correctly? Hmm. How I've managed to just look at static and not check what's happening in initialization routine I wonder... My bad. And,

[Libevent-users] Error in evthread_pthread.c

2012-08-20 Thread Chernyshev Vyacheslav
Hello. My application had a very confusing crash today, it failed at assertion deep inside pthreads library. Here is an exact output: tpp.c:63: __pthread_tpp_change_priority: Assertion `new_prio == -1 || (new_prio >= __sched_fifo_min_prio && new_prio <= __sched_fifo_max_prio)' failed. Afte

[Libevent-users] Recommended way of notifying all active sessions

2012-08-10 Thread Chernyshev Vyacheslav
Hello. I bet that this question was already asked a couple of times, but… What is the right way to execute some action for all currently registered descriptors? Let imagine that I have a lot of active client sessions that must save some state to DB when socket is closed and that I use buffered e

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

2012-08-10 Thread Chernyshev Vyacheslav
10.08.2012, в 19:15, Riccardo Tacconi wrote > char *data; > evbuffer_copyout(in_evb, data, len); Hello. You must have an initialized data buffer before copying anything to it. Something like: char *data = malloc(len); With your current code you try to write to memory that does not belon