From 85aff44e00e836eda618d4f1cf013bce38b3fd44 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 17 Nov 2024 18:23:17 -0800 Subject: URL u_port should be a number not a string. The idea here is to reduce the dynamic allocations used for URLs, and also the back and forth with parsing begin strings and port numbers. We always resolve to a port number, and this is easier for everyone. The real goal in the long term is to eliminate dynamic allocation of the URL fields altogether, but that requires a little more work. This is a step in the right direction. --- src/sp/transport/tls/tls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sp/transport/tls') diff --git a/src/sp/transport/tls/tls.c b/src/sp/transport/tls/tls.c index 7a1d5582..b1aea7b3 100644 --- a/src/sp/transport/tls/tls.c +++ b/src/sp/transport/tls/tls.c @@ -837,7 +837,7 @@ tlstran_ep_init_dialer(void **dp, nni_url *url, nni_dialer *ndialer) } if ((url->u_fragment != NULL) || (url->u_userinfo != NULL) || (url->u_query != NULL) || (strlen(url->u_hostname) == 0) || - (strlen(url->u_port) == 0)) { + (url->u_port == 0)) { return (NNG_EADDRINVAL); } -- cgit v1.2.3-70-g09d2