From 13e380343c0eec96a723e7407d59fb7f5d20aba0 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 2 Jan 2017 17:35:49 -0800 Subject: Fixes to enable REQ/REP to operate. This uncovered a few problems - inproc was not moving the headers to the body on transmit, and the message chunk allocator had a serious bug leading to memory corruption. I've also added a message dumper, which turns out to be incredibly useful during debugging. --- src/core/defs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/defs.h') diff --git a/src/core/defs.h b/src/core/defs.h index dd225567..e44be1ec 100644 --- a/src/core/defs.h +++ b/src/core/defs.h @@ -28,7 +28,7 @@ typedef struct nni_tran nni_tran; typedef struct nni_tran_ep nni_tran_ep; typedef struct nni_tran_pipe nni_tran_pipe; -typedef struct nni_proto_pipe nni_proto_pipe; +typedef struct nni_proto_pipe nni_proto_pipe; typedef struct nni_proto nni_proto; typedef int nni_signal; // Turnstile/wakeup channel. @@ -41,7 +41,7 @@ typedef int64_t nni_duration; // Relative time (usec). #define NNI_SECOND (1000000) // Structure allocation conveniences. -#define NNI_ALLOC_STRUCT(s) nni_alloc(sizeof (*(s))) -#define NNI_FREE_STRUCT(s) nni_free((s), sizeof (*(s))) +#define NNI_ALLOC_STRUCT(s) nni_alloc(sizeof (*s)) +#define NNI_FREE_STRUCT(s) nni_free((s), sizeof (*s)) #endif // CORE_DEFS_H -- cgit v1.2.3-70-g09d2