From dbbee1a3ea7fbd26c528eb96ebe0dbfd7075e292 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 10 Aug 2017 18:14:27 -0700 Subject: Unify the msg API. This makes the operations that work on headers start with nni_msg_header or nng_msg_header. It also renames _trunc to _chop (same strlen as _trim), and renames prepend to insert. We add a shorthand for clearing message content, and make better use of the endian safe 32-bit accessors too. This also fixes a bug in inserting large headers into messages. A test suite for message handling is included. --- src/core/socket.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core/socket.c') diff --git a/src/core/socket.c b/src/core/socket.c index 46ed2100..711cd57a 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -411,7 +411,6 @@ nni_sock_open(nni_sock **sockp, const nni_proto *proto) { nni_sock *s = NULL; int rv; - uint32_t sockid; if (proto->proto_version != NNI_PROTOCOL_VERSION) { // unsupported protocol version @@ -603,7 +602,6 @@ void nni_sock_closeall(void) { nni_sock *s; - uint32_t id; for (;;) { nni_mtx_lock(&nni_sock_lk); -- cgit v1.2.3-70-g09d2