From 77311bfcc94bba96cdee73ddcd1ac9a6d0ed17d2 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 14 Aug 2018 15:57:57 +0500 Subject: fixes #208 pipe start should occur before connect / accept fixes #599 nng_dial sync should not return until added to socket This reintroduces the changes for the above fixes, building upon the transport modifications that we have made to eliminate the separate transport pipe start entry point. It also includes slightly reworked code during start to put a hold on the pipe when it is created, which we we drop at the end, hopefully fixing a use-after-free. --- src/core/transport.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/core/transport.h') diff --git a/src/core/transport.h b/src/core/transport.h index 257d232d..8b08e366 100644 --- a/src/core/transport.h +++ b/src/core/transport.h @@ -30,7 +30,8 @@ enum nni_ep_mode { #define NNI_TRANSPORT_V1 0x54520001 #define NNI_TRANSPORT_V2 0x54520002 #define NNI_TRANSPORT_V3 0x54520003 -#define NNI_TRANSPORT_VERSION NNI_TRANSPORT_V3 +#define NNI_TRANSPORT_V4 0x54520004 +#define NNI_TRANSPORT_VERSION NNI_TRANSPORT_V4 // Option handlers. struct nni_tran_option { @@ -131,13 +132,6 @@ struct nni_tran_pipe_ops { // make further calls on the same pipe. void (*p_fini)(void *); - // p_start starts the pipe running. This gives the transport a - // chance to hook into any transport specific negotiation - // phase. The pipe will not have its p_send or p_recv calls - // started, and will not be access by the "socket" until the - // pipe has indicated its readiness by finishing the aio. - void (*p_start)(void *, nni_aio *); - // p_stop stops the pipe, waiting for any callbacks that are // outstanding to complete. This is done before tearing down // resources with p_fini. -- cgit v1.2.3-70-g09d2