From 76c1fc80c931b086493835d037245ebbb5f8d406 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 17 Aug 2017 11:49:16 -0700 Subject: fixes #39 Transport ops vector should be versioned This also includes tests for some of the edge cases surrounding pluggable transports, such as version mismatch, duplication registration, and failure to initialize. --- src/transport/inproc/inproc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/transport/inproc') diff --git a/src/transport/inproc/inproc.c b/src/transport/inproc/inproc.c index 08cf99a2..5b443d63 100644 --- a/src/transport/inproc/inproc.c +++ b/src/transport/inproc/inproc.c @@ -522,9 +522,10 @@ static nni_tran_ep nni_inproc_ep_ops = { // This is the inproc transport linkage, and should be the only global // symbol in this entire file. struct nni_tran nni_inproc_tran = { - .tran_scheme = "inproc", - .tran_ep = &nni_inproc_ep_ops, - .tran_pipe = &nni_inproc_pipe_ops, - .tran_init = nni_inproc_init, - .tran_fini = nni_inproc_fini, + .tran_version = NNI_TRANSPORT_VERSION, + .tran_scheme = "inproc", + .tran_ep = &nni_inproc_ep_ops, + .tran_pipe = &nni_inproc_pipe_ops, + .tran_init = nni_inproc_init, + .tran_fini = nni_inproc_fini, }; -- cgit v1.2.3-70-g09d2