diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-10-31 00:47:21 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-10-31 00:47:21 -0700 |
| commit | 475f4c8abfdd9c88b585105c48839f51d7523d57 (patch) | |
| tree | f6fa693cd20d1f419ec5a1af0b60ffb798b68b4c /src/protocol/pubsub | |
| parent | b92320b9afe3771465514286db6ee6746ba512d8 (diff) | |
| download | nng-475f4c8abfdd9c88b585105c48839f51d7523d57.tar.gz nng-475f4c8abfdd9c88b585105c48839f51d7523d57.tar.bz2 nng-475f4c8abfdd9c88b585105c48839f51d7523d57.zip | |
fixes #137 Remove public access to numeric protocols
Diffstat (limited to 'src/protocol/pubsub')
| -rw-r--r-- | src/protocol/pubsub/pub.c | 6 | ||||
| -rw-r--r-- | src/protocol/pubsub/sub.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/protocol/pubsub/pub.c b/src/protocol/pubsub/pub.c index 29863322..9e5cd67f 100644 --- a/src/protocol/pubsub/pub.c +++ b/src/protocol/pubsub/pub.c @@ -142,7 +142,7 @@ pub_pipe_start(void *arg) pub_pipe *p = arg; pub_sock *s = p->pub; - if (nni_pipe_peer(p->pipe) != NNG_PROTO_SUB) { + if (nni_pipe_peer(p->pipe) != NNI_PROTO_SUB_V0) { return (NNG_EPROTO); } nni_mtx_lock(&s->mtx); @@ -321,8 +321,8 @@ static nni_proto_sock_ops pub_sock_ops = { static nni_proto pub_proto = { .proto_version = NNI_PROTOCOL_VERSION, - .proto_self = { NNG_PROTO_PUB_V0, "pub" }, - .proto_peer = { NNG_PROTO_SUB_V0, "sub" }, + .proto_self = { NNI_PROTO_PUB_V0, "pub" }, + .proto_peer = { NNI_PROTO_SUB_V0, "sub" }, .proto_flags = NNI_PROTO_FLAG_SND, .proto_sock_ops = &pub_sock_ops, .proto_pipe_ops = &pub_pipe_ops, diff --git a/src/protocol/pubsub/sub.c b/src/protocol/pubsub/sub.c index d87b42ec..555d528e 100644 --- a/src/protocol/pubsub/sub.c +++ b/src/protocol/pubsub/sub.c @@ -384,8 +384,8 @@ static nni_proto_sock_ops sub_sock_ops = { static nni_proto sub_proto = { .proto_version = NNI_PROTOCOL_VERSION, - .proto_self = { NNG_PROTO_SUB_V0, "sub" }, - .proto_peer = { NNG_PROTO_PUB_V0, "pub" }, + .proto_self = { NNI_PROTO_SUB_V0, "sub" }, + .proto_peer = { NNI_PROTO_PUB_V0, "pub" }, .proto_flags = NNI_PROTO_FLAG_RCV, .proto_sock_ops = &sub_sock_ops, .proto_pipe_ops = &sub_pipe_ops, |
