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/sp/transport/udp/udp_tran_test.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/sp/transport/udp') diff --git a/src/sp/transport/udp/udp_tran_test.c b/src/sp/transport/udp/udp_tran_test.c index 151c2783..781c6ad9 100644 --- a/src/sp/transport/udp/udp_tran_test.c +++ b/src/sp/transport/udp/udp_tran_test.c @@ -29,20 +29,9 @@ void test_udp_wild_card_bind(void) { nng_socket s1; - nng_socket s2; - char addr[NNG_MAXADDRLEN]; - uint16_t port; - - port = nuts_next_port(); NUTS_OPEN(s1); - NUTS_OPEN(s2); - (void) snprintf(addr, sizeof(addr), "udp4://*:%u", port); - NUTS_PASS(nng_listen(s1, addr, NULL, 0)); - nng_msleep(500); - (void) snprintf(addr, sizeof(addr), "udp://127.0.0.1:%u", port); - NUTS_PASS(nng_dial(s2, addr, NULL, 0)); - NUTS_CLOSE(s2); + NUTS_FAIL(nng_listen(s1, "udp://*:8080", NULL, 0), NNG_EADDRINVAL); NUTS_CLOSE(s1); } -- cgit v1.2.3-70-g09d2