From 23a38d766780f4749945d84316b4e0a71e707b15 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 4 Mar 2018 17:04:11 -0800 Subject: fixes #262 NNG_OPT_URL should be resolved This causes TCP, TLS, and ZT endpoints to resolve any wildcards, and even IP addresses, when reporting the listen URL. The dialer URL is reported unresolved. Test cases for this are added as well, and nngcat actually reports this if --verbose is supplied. --- src/core/defs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/defs.h') diff --git a/src/core/defs.h b/src/core/defs.h index b08ce838..c449aa32 100644 --- a/src/core/defs.h +++ b/src/core/defs.h @@ -111,8 +111,8 @@ typedef struct { } while (0) #define NNI_GET16(ptr, v) \ - v = (((uint32_t)((uint8_t)(ptr)[0])) << 8) + \ - (((uint32_t)(uint8_t)(ptr)[1])) + v = (((uint16_t)((uint8_t)(ptr)[0])) << 8) + \ + (((uint16_t)(uint8_t)(ptr)[1])) #define NNI_GET32(ptr, v) \ v = (((uint32_t)((uint8_t)(ptr)[0])) << 24) + \ -- cgit v1.2.3-70-g09d2