diff options
| author | Garrett D'Amore <garrett@damore.org> | 2021-12-31 14:13:08 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2021-12-31 16:11:25 -0800 |
| commit | 5e06e98541ff223e7a18b6a61120532acd09d410 (patch) | |
| tree | 73d3b17ae7676a1e730e190d29f9e2661959b6a2 /src/platform/windows/win_resolv.c | |
| parent | 2f66b99830e6dc731e4f631ea743771df701659e (diff) | |
| download | nng-5e06e98541ff223e7a18b6a61120532acd09d410.tar.gz nng-5e06e98541ff223e7a18b6a61120532acd09d410.tar.bz2 nng-5e06e98541ff223e7a18b6a61120532acd09d410.zip | |
Replace nni_aio_prov_set_extra with nni_aio_prov_set_data.
This takes one less parameter, and is simpler. It will let us
reclaim the aio_prov_extra data space as well, so that we can
use it for other purposes.
Diffstat (limited to 'src/platform/windows/win_resolv.c')
| -rw-r--r-- | src/platform/windows/win_resolv.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/platform/windows/win_resolv.c b/src/platform/windows/win_resolv.c index f855e255..528da451 100644 --- a/src/platform/windows/win_resolv.c +++ b/src/platform/windows/win_resolv.c @@ -56,11 +56,11 @@ resolv_cancel(nni_aio *aio, void *arg, int rv) resolv_item *item = arg; nni_mtx_lock(&resolv_mtx); - if (item != nni_aio_get_prov_extra(aio, 0)) { + if (item != nni_aio_get_prov_data(aio)) { nni_mtx_unlock(&resolv_mtx); return; } - nni_aio_set_prov_extra(aio, 0, NULL); + nni_aio_set_prov_data(aio, NULL); if (nni_aio_list_active(aio)) { // We have not been picked up by a resolver thread yet, // so we can just discard everything. @@ -248,7 +248,7 @@ nni_resolv_ip(const char *host, const char *serv, int family, bool passive, if (resolv_fini) { rv = NNG_ECLOSED; } else { - nni_aio_set_prov_extra(aio, 0, item); + nni_aio_set_prov_data(aio, item); rv = nni_aio_schedule(aio, resolv_cancel, item); } if (rv != 0) { @@ -282,7 +282,7 @@ resolv_worker(void *notused) continue; } - item = nni_aio_get_prov_extra(aio, 0); + item = nni_aio_get_prov_data(aio); nni_aio_list_remove(aio); // Now attempt to do the work. This runs synchronously. @@ -292,7 +292,7 @@ resolv_worker(void *notused) // Check to make sure we were not canceled. if ((aio = item->aio) != NULL) { - nni_aio_set_prov_extra(aio, 0, NULL); + nni_aio_set_prov_data(aio, NULL); item->aio = NULL; item->sa = NULL; |
