diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-10-02 13:34:55 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-10-02 15:29:43 -0700 |
| commit | 6e945e18f3f3e9b7f9ee614eac6d3bf681f768d9 (patch) | |
| tree | fffa3e455ec657ce3205c01c12398076e7ae28f0 /src/core/endpt.c | |
| parent | b9b5c31b19df95d672ddc76cdfde29318f78b5ea (diff) | |
| download | nng-6e945e18f3f3e9b7f9ee614eac6d3bf681f768d9.tar.gz nng-6e945e18f3f3e9b7f9ee614eac6d3bf681f768d9.tar.bz2 nng-6e945e18f3f3e9b7f9ee614eac6d3bf681f768d9.zip | |
Added more complete tests, and changes to property handling.
We allow some properties to be set on endpoints after they are
started; transports now responsible for checking that. (The new
values will only apply to new connections of course!)
We added short-hand functions for pipe properties, and also added
uint64_t shorthands across the board.
The zerotier documentation got some updates (corrections). We have
also added a separate header now for the ZT stuff.
Also, dialers and listeners do not intermix anymore -- we test that
only a dialer can be used with setting dialer options, and likewise
for listeners.
Diffstat (limited to 'src/core/endpt.c')
| -rw-r--r-- | src/core/endpt.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/endpt.c b/src/core/endpt.c index e6216ba3..fa30bf77 100644 --- a/src/core/endpt.c +++ b/src/core/endpt.c @@ -605,21 +605,21 @@ nni_ep_setopt(nni_ep *ep, const char *name, const void *val, size_t sz) return (NNG_EREADONLY); } nni_mtx_lock(&ep->ep_mtx); - // XXX: Consider removing this test. - if (ep->ep_started) { - nni_mtx_unlock(&ep->ep_mtx); - return (NNG_ESTATE); - } rv = eo->eo_setopt(ep->ep_data, val, sz); nni_mtx_unlock(&ep->ep_mtx); return (rv); } - // XXX: socket fallback return (NNG_ENOTSUP); } int +nni_ep_mode(nni_ep *ep) +{ + return (ep->ep_mode); +} + +int nni_ep_getopt(nni_ep *ep, const char *name, void *valp, size_t *szp) { nni_tran_ep_option *eo; |
