From: Nick Mathewson Date: Fri, 23 Apr 2010 18:04:03 +0000 (-0400) Subject: Add a comment to explain why evdns_request is now separte from request X-Git-Tag: release-2.0.5-beta~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ceefbe87303c8c96dc809ad8afc736f2dbaa194a;p=libevent Add a comment to explain why evdns_request is now separte from request --- diff --git a/evdns.c b/evdns.c index 3dbe7bea..30269078 100644 --- a/evdns.c +++ b/evdns.c @@ -148,7 +148,10 @@ typedef unsigned int uint; #define CLASS_INET EVDNS_CLASS_INET -/* persistent handle */ +/* Persistent handle. We keep this separate from 'struct request' since we + * need some object to last for as long as an evdns_request is outstanding so + * that it can be cancelled, whereas a search request can lead to multiple + * 'struct request' instances being created over its lifetime. */ struct evdns_request { struct request *current_req; @@ -182,7 +185,7 @@ struct request { char **put_cname_in_ptr; /* store the cname here if we get one. */ struct evdns_base *base; - + struct evdns_request *handle; };