From ca6cfe359fa55a5a7f4b6ae73500ffd98e6ee968 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 18 Nov 2024 01:17:24 -0800 Subject: URL refactor part 1. This eliminates most (but not all) of the dynamic allocations associated with URL objects. A number of convenience fields on the URL are removed, but we are able to use common buffer for most of the details. --- src/platform/windows/win_resolv.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/platform/windows') diff --git a/src/platform/windows/win_resolv.c b/src/platform/windows/win_resolv.c index ece14655..f9e5e1f6 100644 --- a/src/platform/windows/win_resolv.c +++ b/src/platform/windows/win_resolv.c @@ -190,11 +190,13 @@ nni_resolv_ip(const char *host, uint16_t port, int family, bool passive, if (nni_aio_begin(aio) != 0) { return; } - if (host != NULL && strlen(host) >= sizeof(item->host)) { - nni_aio_finish_error(aio, NNG_EADDRINVAL); - return; + if (host != NULL) { + if ((strlen(host) >= sizeof(item->host)) || + (strcmp(host, "*") == 0)) { + nni_aio_finish_error(aio, NNG_EADDRINVAL); + return; + } } - switch (family) { case NNG_AF_INET: fam = AF_INET; -- cgit v1.2.3-70-g09d2