Re: [Libevent-users] bug + question

2011-01-06 Thread Mihai Draghicioiu
s generating any trouble. I wasn't thinking of any standard. On Wed, Jan 5, 2011 at 9:16 PM, Nick Mathewson wrote: > On Thu, Dec 30, 2010 at 8:21 PM, Mihai Draghicioiu > wrote: >> Hi all. I've found that evhttp_parse_query_str only works if the query >> string is of the f

[Libevent-users] bug + question

2010-12-30 Thread Mihai Draghicioiu
Hi all. I've found that evhttp_parse_query_str only works if the query string is of the form foo=bar&baz=quux. If we have a query string of the form foo=bar&baz (no value for the last key), it fails. I consider this a bug, because you have all the other valid parameters in there, and it can just se

Re: [Libevent-users] asynchronous or simultanous web service using evhttp.h

2010-11-11 Thread Mihai Draghicioiu
Just use an event loop and http callbacks in your server code. That's what the whole point of libevent is, i think. I can show you an example libevent based http page http://mappinghell.net:2 it refreshes some data each 2 seconds in the web page using ajax. You'll need to manually set some http

Re: [Libevent-users] Re: help with debugging

2010-10-29 Thread Mihai Draghicioiu
lback return if the pointer is null, yo. I suppose one would use the void *arg to do better cleanup. On Mon, Oct 25, 2010 at 9:28 AM, Mihai Draghicioiu wrote: > Well, in the meanwhile i've fixed this by reusing an existing evhttp > connection several times, and if it closes down i just c

Re: [Libevent-users] Re: help with debugging

2010-10-24 Thread Mihai Draghicioiu
mehow. Another question i have - there was word about enabling some extra checks in the code, in debug mode. How do i enable these? On Mon, Oct 25, 2010 at 3:04 AM, Nick Mathewson wrote: > On Sun, Sep 19, 2010 at 4:23 AM, Mihai Draghicioiu > wrote: >> Alright, i think i found the bu

Re: [Libevent-users] Re: help with debugging

2010-09-19 Thread Mihai Draghicioiu
llzey wrote: > On Fri, Sep 17, 2010 at 10:29:08AM -0400, Nick Mathewson wrote: >> On Fri, Sep 17, 2010 at 5:22 AM, Mihai Draghicioiu >> wrote: >> [...] >> > Core was generated by `/home/mihai/frogmod-justice/frogserv'. >> > Program terminated with signa

Re: [Libevent-users] Re: help with debugging

2010-09-19 Thread Mihai Draghicioiu
7;s input buffer (the http response) and outputs it to console. So now it comes down to a question - how do i determine inside http_event_cb whether i've received an error or success? Thanks for the help, Mihai On Fri, Sep 17, 2010 at 5:29 PM, Nick Mathewson wrote: > On Fri, Sep

[Libevent-users] Re: help with debugging

2010-09-17 Thread Mihai Draghicioiu
45, tv_usec = 0}, enabled = 0} (gdb) print bev_p[0] No symbol "bev_p" in current context. (gdb) It seems that by the time _bufferevent_run_eventcb() is called, its bufev argument ends up being 0x20. No idea what to do next. On Thu, Sep 16, 2010 at 11:17 AM, Mihai Draghicioiu wrote: &

[Libevent-users] help with debugging

2010-09-16 Thread Mihai Draghicioiu
Hi, i've received a http/dns related crash inside libevent code, and i'm not sure if it's a libevent bug or my application's bug. I'm using 2.0.7-rc on linux. The code that uses the http code is here http://github.com/vampirefrog/frogmod-justice/blob/master/fpsgame/server.cpp#L746 Lines 746-790.

Re: [Libevent-users] ANN: Libevent 2.0.7-rc is released

2010-09-10 Thread Mihai Draghicioiu
ntenance branch and start > development on 2.1. > > *** Acknowledgements > > Many thanks to everybody who contributed code, suggestions, or bug > reports to this release, including but absolutely not limited to Niels > Provos, Christopher Davis, Avi Bab, Gilad Benjamini, Ral

Re: [Libevent-users] [PATCH] uri parsing helpers

2010-08-20 Thread Mihai Draghicioiu
Great! On Sun, Aug 8, 2010 at 3:57 PM, Pavel Plesov wrote: > On Sun, Aug 8, 2010 at 3:55 PM, Pavel Plesov wrote: > >> I will alter the patch: add evhttp_uri_free(), and suppose there is no >> more need for evhttp_uri_clear(). >> >> >> [1] >> https://sourceforge.net/tracker/?func=detail&aid=3037

Re: [Libevent-users] [PATCH] uri parsing helpers

2010-08-08 Thread Mihai Draghicioiu
I suggest either allocating the uri struct in memory or not calling evhttp_uri_clear at the top of evhttp_uri_parse. When declaring the uri variable inside a function, it will be uninitialized, so in order to avoid a crash from evhttp_uri_clear, one has to memset the struct to zero. So I suggest se

[Libevent-users] Re: [Libevent-users] Re: [Libevent-users] error: agg regate ‘evkeyvalq query’ has incomplete type and cannot be defined

2010-07-29 Thread Mihai Draghicioiu
Thanks to your suggestion, i've fixed it by prepending #include to the other libevent headers. Thanks! On Wed, Jul 28, 2010 at 3:47 PM, Mihai Draghicioiu wrote: > 2.0.5-beta > > #include > #include > #include > #include > > thanks > > On Tue, Jul 27, 201

[Libevent-users] Re: [Libevent-users] Re: [Libevent-users] error: agg regate ‘evkeyvalq query’ has incomplete type and cannot be defined

2010-07-28 Thread Mihai Draghicioiu
2.0.5-beta #include #include #include #include thanks On Tue, Jul 27, 2010 at 9:28 PM, Nick Mathewson wrote: > On Sun, Jul 25, 2010 at 11:12 AM, Mihai Draghicioiu > wrote: >> Hi guys. I'm trying to extract parameters from the url query, but i >> can't seem t

[Libevent-users] error: aggregate ‘evkeyvalq query’ has incomplet e type and cannot be defined

2010-07-25 Thread Mihai Draghicioiu
Hi guys. I'm trying to extract parameters from the url query, but i can't seem to figure out why i'm getting this error. Here is the code: static void httpadmincb(struct evhttp_request *req, void *arg) { . . . struct evkeyvalq query; evhttp