summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2021-08-21 16:11:54 -0700
committerGarrett D'Amore <garrett@damore.org>2021-08-21 16:11:54 -0700
commit6fa07fc4d1891d0486b2ee7aa4f1e31d063c9e3f (patch)
tree2fbaffe2242ec2cb9a4fc97d67be76a779dc1941 /src
parent169221da8d53b2ca4fda76f894bee8505887a7c6 (diff)
downloadnng-6fa07fc4d1891d0486b2ee7aa4f1e31d063c9e3f.tar.gz
nng-6fa07fc4d1891d0486b2ee7aa4f1e31d063c9e3f.tar.bz2
nng-6fa07fc4d1891d0486b2ee7aa4f1e31d063c9e3f.zip
Move protocol.c into SP tree (it is SP specific.)
Also, remove an extraneous initialization call.
Diffstat (limited to 'src')
-rw-r--r--src/core/CMakeLists.txt1
-rw-r--r--src/sp/CMakeLists.txt1
-rw-r--r--src/sp/protocol.c (renamed from src/core/protocol.c)3
3 files changed, 1 insertions, 4 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index b55bd70a..8ff5a80d 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -50,7 +50,6 @@ nng_sources(
pipe.c
pipe.h
platform.h
- protocol.c
protocol.h
reap.c
reap.h
diff --git a/src/sp/CMakeLists.txt b/src/sp/CMakeLists.txt
index aa790c09..4704f802 100644
--- a/src/sp/CMakeLists.txt
+++ b/src/sp/CMakeLists.txt
@@ -13,6 +13,7 @@ add_subdirectory(protocol)
add_subdirectory(transport)
nng_sources(
+ protocol.c
transport.c
transport.h
)
diff --git a/src/core/protocol.c b/src/sp/protocol.c
index 2123d7e8..512b27cc 100644
--- a/src/core/protocol.c
+++ b/src/sp/protocol.c
@@ -19,9 +19,6 @@ nni_proto_open(nng_socket *sip, const nni_proto *proto)
int rv;
nni_sock *sock;
- if ((rv = nni_init()) != 0) {
- return (rv);
- }
if ((rv = nni_sock_open(&sock, proto)) == 0) {
nng_socket s;
s.id = nni_sock_id(sock); // Keep socket held open.