From da2aac4a6eb10af88e3938068e24c58aea1832b1 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 12 Jun 2018 20:05:34 -0700 Subject: fixes #540 nni_ep_opttype serves no purpose fixes #538 setopt should have an explicit chkopt routine fixes #537 Internal TCP API needs better name separation fixes #524 Option types should be "typed" This is a rework of the option management code, to make it both clearer and to prepare for further work to break up endpoints. This reduces a certain amount of dead or redundant code, and actually saves cycles when setting options, as some loops were not terminated that should have been. --- src/core/pipe.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/pipe.h') diff --git a/src/core/pipe.h b/src/core/pipe.h index 4ccbeae2..bd66d4ed 100644 --- a/src/core/pipe.h +++ b/src/core/pipe.h @@ -60,7 +60,8 @@ extern uint16_t nni_pipe_peer(nni_pipe *); // nni_pipe_getopt looks up the option. The last argument is the type, // which. If the type is NNI_TYPE_OPAQUE, then no format check is performed. -extern int nni_pipe_getopt(nni_pipe *, const char *, void *, size_t *, int); +extern int nni_pipe_getopt( + nni_pipe *, const char *, void *, size_t *, nni_opt_type); // nni_pipe_get_proto_data gets the protocol private data set with the // nni_pipe_set_proto_data function. No locking is performed. -- cgit v1.2.3-70-g09d2