[Libevent-users] [Patch] evhttp fix
Ben Rigas
ben.rigas at interoptechnologies.com
Fri May 11 15:12:00 EDT 2007
We had an issue where we needed to evhttp_conneciton_free() inside
the response callback, which caused an error with line 617 of http.c
/* notify the user of the request */
(*req->cb)(req, req->cb_arg);
/* if this was an outgoing request, we own and it's done. so
free it */
if (evcon->flags & EVHTTP_CON_OUTGOING) {
evhttp_request_free(req);
}
Since evcon was free'd in the callback, we got the error.
My solution was to store the result of evcon->flags &
EVHTTP_CON_OUTGOING before we make the callback.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: http_fix.patch
Type: application/octet-stream
Size: 857 bytes
Desc: not available
Url : http://monkeymail.org/archives/libevent-users/attachments/20070511/10abb7fb/http_fix.obj
-------------- next part --------------
-Ben
--
Ben Rigas
Senior Software Engineer, InterOP Technologies
(239) 425-3000
More information about the Libevent-users
mailing list