[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



On Sun, Sep 19, 2010 at 4:23 AM, Mihai Draghicioiu
<mihai.draghicioiu@xxxxxxxxx> wrote:
> Alright, i think i found the bug -- still not sure whether it's me or
> the library, but:

Hi, and sorry about the long delay.  I'm trying to clear my long
backlog of evhttp-related stuff.

I'm still trying to feel my way around the evhttp code, but it looks
to me, from reading evhttp_connection_fail, that your callback will
get invoked with a request of NULL if the connection fails before it
gets to attempt any requests.  Sadly, this doesn't seem to be
well-documented.

This would explain, though, why you're seeing this error: you need to
check to make sure that the request isn't NULL before you go and try
to get its buffers, and if it's NULL, you've got to treat it as a
connection error.

No, I don't think this is a great interface either.  Some time in 2.1
it would probably make sense to see how we can improve this stuff in a
backward- compatible way, if it's as weird as it seems to be to me
now.

yrs,
-- 
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.