forked from libevent/libevent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
evdns: integrate deferred_response_callback into evdns_request
the allocation of the struct deferred_reply_callback can fail. If that happens a program waiting for a callback never gets a callback. The program would asume that it either gets an error or a callback when e.g. calling evdns_base_resolve_ipv6. I did an analysis of the evdns.c code and concluded that struct evdns_request would live until the callback is executed. Based on that conclusion I removed the struct deferred_reply_callback and moved the neccessary fields for data which should be copied from struct request into struct evdns_request. The fields evdns_callback_type user_callback and void *user_pointer are moved into struct evdns_request as it is a more natural place for them to live than struct request.
- Loading branch information
Showing
1 changed file
with
88 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters