From 0cd2fa7310f1fdf45443a8a9e3335658b1c3c64c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 25 Dec 2016 18:08:44 -0800 Subject: Substantial fixes for listen & dialers. At this point listening and dialing operations appear to function properly. As part of this I had to break the close logic up since otherwise we had a loop trying to reap a thread from itself. So there is now a separate reaper thread for pipes per-socket. I also changed lists to be a bit more rigid, and allocations now zero memory initially. (We had bugs due to uninitialized memory, and rather than hunt them all down, lets just init them to sane zero values.) --- src/core/pipe.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/core/pipe.h') diff --git a/src/core/pipe.h b/src/core/pipe.h index 5349bbb1..4594f65b 100644 --- a/src/core/pipe.h +++ b/src/core/pipe.h @@ -19,10 +19,13 @@ struct nng_pipe { uint32_t p_id; struct nni_pipe_ops p_ops; - void * p_data; - nni_list_node p_sock_node; + void * p_trandata; + void * p_protdata; + nni_list_node p_node; nni_socket * p_sock; nni_endpt * p_ep; + int p_reap; + int p_active; }; // Pipe operations that protocols use. @@ -33,7 +36,7 @@ extern void nni_pipe_close(nni_pipe *); // Used only by the socket core - as we don't wish to expose the details // of the pipe structure outside of pipe.c. -extern int nni_pipe_create(nni_pipe **, const nni_pipe_ops *); +extern int nni_pipe_create(nni_pipe **, nni_endpt *); extern void nni_pipe_destroy(nni_pipe *); -- cgit v1.2.3-70-g09d2