aboutsummaryrefslogtreecommitdiff
path: root/src/sp/protocol.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-02-25 17:13:38 -0800
committerGarrett D'Amore <garrett@damore.org>2024-02-25 18:39:56 -0800
commit53a9740d1dcbad6be4b4c1a10a5f3fcbb97a5be9 (patch)
tree00c49f3cd56f5797ec0d3f31dab689c6573fc6e6 /src/sp/protocol.c
parent8e62028a0db24364ea218007811e58ea11d0b64f (diff)
downloadnng-53a9740d1dcbad6be4b4c1a10a5f3fcbb97a5be9.tar.gz
nng-53a9740d1dcbad6be4b4c1a10a5f3fcbb97a5be9.tar.bz2
nng-53a9740d1dcbad6be4b4c1a10a5f3fcbb97a5be9.zip
fixes #1496 Provide NNG_ENABLE_IPV6 option (disabled by default)
This also checks if the build system has the definitions for AF_INET6, which might help in some embedded IPv4 only settings. The resolver test is enhanced to include a check for IPv6 enabled in the kernel. IPv6 support is enabled by default, of course.
Diffstat (limited to 'src/sp/protocol.c')
-rw-r--r--src/sp/protocol.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/sp/protocol.c b/src/sp/protocol.c
index 512b27cc..d64c85a3 100644
--- a/src/sp/protocol.c
+++ b/src/sp/protocol.c
@@ -12,7 +12,6 @@
#include "core/nng_impl.h"
-
int
nni_proto_open(nng_socket *sip, const nni_proto *proto)
{
@@ -21,8 +20,8 @@ nni_proto_open(nng_socket *sip, const nni_proto *proto)
if ((rv = nni_sock_open(&sock, proto)) == 0) {
nng_socket s;
- s.id = nni_sock_id(sock); // Keep socket held open.
- *sip = s;
+ s.id = nni_sock_id(sock); // Keep socket held open.
+ *sip = s;
}
return (rv);
}