diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-12-28 23:29:35 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-28 23:29:35 -0800 |
| commit | d574649899a29ce7eb96485c0a4c606f14f87011 (patch) | |
| tree | 0d6282c98fc458a4c24cc0b9f0f442bb2b958da3 /src/platform/windows/win_tcpdial.c | |
| parent | 945dbef5e8eb060654aec33851937f1e3325913b (diff) | |
| download | nng-d574649899a29ce7eb96485c0a4c606f14f87011.tar.gz nng-d574649899a29ce7eb96485c0a4c606f14f87011.tar.bz2 nng-d574649899a29ce7eb96485c0a4c606f14f87011.zip | |
resolver: use explicit resolver item provided by caller
This avoids the need to perform multiple allocations for dialing,
eliminating additional potential failures. Cancellation is also
made simpler and more perfectly robust.
Diffstat (limited to 'src/platform/windows/win_tcpdial.c')
| -rw-r--r-- | src/platform/windows/win_tcpdial.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platform/windows/win_tcpdial.c b/src/platform/windows/win_tcpdial.c index 11f4f669..12bedf0a 100644 --- a/src/platform/windows/win_tcpdial.c +++ b/src/platform/windows/win_tcpdial.c @@ -307,7 +307,7 @@ tcp_dialer_get_locaddr(void *arg, void *buf, size_t *szp, nni_type t) nng_sockaddr sa; nni_mtx_lock(&d->mtx); - if (nni_win_sockaddr2nn(&sa, &d->src) != 0) { + if (nni_win_sockaddr2nn(&sa, &d->src, sizeof(d->src)) != 0) { sa.s_family = NNG_AF_UNSPEC; } nni_mtx_unlock(&d->mtx); |
