cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Porting CURL to the AirplaySDK environment

From: Всеволод Новиков <novikov_at_doroga.tv>
Date: Thu, 27 Jan 2011 21:58:02 +0300

Hi Daniel,

The applied patch (against the developer branch) is proposed to be
included into the curl because:
   - it allows to extend asynchronous resolvers set much more easy than
the existing code
   - it defines stable and rich set of asynchronous and synchronous
resolver interface functions
   - it removes any resolver implementation details from the common code

Some details:

The resolver interface now contains the following additional functions
described and documented in the hostip.h:

int Curl_resolver_global_init(void);
void Curl_resolver_global_cleanup(void);
int Curl_resolver_init(void **resolver);
void Curl_resolver_cleanup(void *resolver);
int Curl_resolver_duphandle(void **to, void *from);

The function

void Curl_async_cancel(struct connectdata *conn);

now totally replaces the function Curl_destroy_thread_data() which has
been moved to the static part of the threaded resolver and renamed to
destroy_async_data().

All resolver function calls except asynchronous are unconditional. The
asynchronous Curl_async_cancel() call depends only from CURLRES_ASYNCH
define.

Resolver-specific part is removed from the async member of the
connection and moved to os_specific which now is allocated and
deallocated totally from inside a resolver.

The patch has been tested on the applied test (which is a little
modification of the previous one) with c-ares, threaded, and default
resolvers. The starting part of the test suite has been passed, I don't
have a time right now to pass the whole set, hope they will be passed also.

Regards,
Vsevolod

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

  • text/x-csrc attachment: test.c
Received on 2011-01-27