summaryrefslogtreecommitdiff
path: root/src/protocol
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-12-27 21:31:10 -0800
committerGarrett D'Amore <garrett@damore.org>2020-12-27 21:31:10 -0800
commit840f968d9318e07b0b7cde97b8461f330f8a4573 (patch)
tree51ff4036d5ee43bd27efa5475484f3439f19b686 /src/protocol
parente86ac84769e8467d0503840aedce208881eae1a6 (diff)
downloadnng-840f968d9318e07b0b7cde97b8461f330f8a4573.tar.gz
nng-840f968d9318e07b0b7cde97b8461f330f8a4573.tar.bz2
nng-840f968d9318e07b0b7cde97b8461f330f8a4573.zip
fixes #1386 remove NNI_PROTO_FLAG_NOMSGQ
Diffstat (limited to 'src/protocol')
-rw-r--r--src/protocol/pipeline0/pull.c13
-rw-r--r--src/protocol/pipeline0/push.c15
-rw-r--r--src/protocol/pubsub0/pub.c2
-rw-r--r--src/protocol/pubsub0/sub.c2
-rw-r--r--src/protocol/reqrep0/rep.c2
-rw-r--r--src/protocol/reqrep0/req.c2
-rw-r--r--src/protocol/survey0/respond.c2
-rw-r--r--src/protocol/survey0/survey.c2
8 files changed, 19 insertions, 21 deletions
diff --git a/src/protocol/pipeline0/pull.c b/src/protocol/pipeline0/pull.c
index 94403431..616b0817 100644
--- a/src/protocol/pipeline0/pull.c
+++ b/src/protocol/pipeline0/pull.c
@@ -186,7 +186,7 @@ static void
pull0_sock_close(void *arg)
{
pull0_sock *s = arg;
- nni_aio *a;
+ nni_aio * a;
nni_mtx_lock(&s->m);
while ((a = nni_list_first(&s->rq)) != NULL) {
nni_aio_list_remove(a);
@@ -298,17 +298,16 @@ static nni_proto pull0_proto = {
.proto_version = NNI_PROTOCOL_VERSION,
.proto_self = { NNI_PROTO_PULL_V0, "pull" },
.proto_peer = { NNI_PROTO_PUSH_V0, "push" },
- .proto_flags = NNI_PROTO_FLAG_RCV | NNI_PROTO_FLAG_NOMSGQ,
+ .proto_flags = NNI_PROTO_FLAG_RCV,
.proto_pipe_ops = &pull0_pipe_ops,
.proto_sock_ops = &pull0_sock_ops,
};
static nni_proto pull0_proto_raw = {
- .proto_version = NNI_PROTOCOL_VERSION,
- .proto_self = { NNI_PROTO_PULL_V0, "pull" },
- .proto_peer = { NNI_PROTO_PUSH_V0, "push" },
- .proto_flags =
- NNI_PROTO_FLAG_RCV | NNI_PROTO_FLAG_RAW | NNI_PROTO_FLAG_NOMSGQ,
+ .proto_version = NNI_PROTOCOL_VERSION,
+ .proto_self = { NNI_PROTO_PULL_V0, "pull" },
+ .proto_peer = { NNI_PROTO_PUSH_V0, "push" },
+ .proto_flags = NNI_PROTO_FLAG_RCV | NNI_PROTO_FLAG_RAW,
.proto_pipe_ops = &pull0_pipe_ops,
.proto_sock_ops = &pull0_sock_ops,
};
diff --git a/src/protocol/pipeline0/push.c b/src/protocol/pipeline0/push.c
index 8aa5311c..ad43d967 100644
--- a/src/protocol/pipeline0/push.c
+++ b/src/protocol/pipeline0/push.c
@@ -353,7 +353,7 @@ static int
push0_get_send_buf_len(void *arg, void *buf, size_t *szp, nni_opt_type t)
{
push0_sock *s = arg;
- int val;
+ int val;
nni_mtx_lock(&s->m);
val = nni_lmq_cap(&s->wq);
@@ -394,7 +394,7 @@ static nni_option push0_sock_options[] = {
.o_get = push0_get_send_buf_len,
.o_set = push0_set_send_buf_len,
},
- // terminate list
+ // terminate list
{
.o_name = NULL,
},
@@ -415,17 +415,16 @@ static nni_proto push0_proto = {
.proto_version = NNI_PROTOCOL_VERSION,
.proto_self = { NNI_PROTO_PUSH_V0, "push" },
.proto_peer = { NNI_PROTO_PULL_V0, "pull" },
- .proto_flags = NNI_PROTO_FLAG_SND | NNI_PROTO_FLAG_NOMSGQ,
+ .proto_flags = NNI_PROTO_FLAG_SND,
.proto_pipe_ops = &push0_pipe_ops,
.proto_sock_ops = &push0_sock_ops,
};
static nni_proto push0_proto_raw = {
- .proto_version = NNI_PROTOCOL_VERSION,
- .proto_self = { NNI_PROTO_PUSH_V0, "push" },
- .proto_peer = { NNI_PROTO_PULL_V0, "pull" },
- .proto_flags =
- NNI_PROTO_FLAG_SND | NNI_PROTO_FLAG_RAW | NNI_PROTO_FLAG_NOMSGQ,
+ .proto_version = NNI_PROTOCOL_VERSION,
+ .proto_self = { NNI_PROTO_PUSH_V0, "push" },
+ .proto_peer = { NNI_PROTO_PULL_V0, "pull" },
+ .proto_flags = NNI_PROTO_FLAG_SND | NNI_PROTO_FLAG_RAW,
.proto_pipe_ops = &push0_pipe_ops,
.proto_sock_ops = &push0_sock_ops,
};
diff --git a/src/protocol/pubsub0/pub.c b/src/protocol/pubsub0/pub.c
index 2bd723cc..e3d4f16a 100644
--- a/src/protocol/pubsub0/pub.c
+++ b/src/protocol/pubsub0/pub.c
@@ -356,7 +356,7 @@ static nni_proto pub0_proto = {
.proto_version = NNI_PROTOCOL_VERSION,
.proto_self = { NNI_PROTO_PUB_V0, "pub" },
.proto_peer = { NNI_PROTO_SUB_V0, "sub" },
- .proto_flags = NNI_PROTO_FLAG_SND | NNI_PROTO_FLAG_NOMSGQ,
+ .proto_flags = NNI_PROTO_FLAG_SND,
.proto_sock_ops = &pub0_sock_ops,
.proto_pipe_ops = &pub0_pipe_ops,
};
diff --git a/src/protocol/pubsub0/sub.c b/src/protocol/pubsub0/sub.c
index c56c8b79..9f3f2283 100644
--- a/src/protocol/pubsub0/sub.c
+++ b/src/protocol/pubsub0/sub.c
@@ -742,7 +742,7 @@ static nni_proto sub0_proto = {
.proto_version = NNI_PROTOCOL_VERSION,
.proto_self = { NNI_PROTO_SUB_V0, "sub" },
.proto_peer = { NNI_PROTO_PUB_V0, "pub" },
- .proto_flags = NNI_PROTO_FLAG_RCV | NNI_PROTO_FLAG_NOMSGQ,
+ .proto_flags = NNI_PROTO_FLAG_RCV,
.proto_sock_ops = &sub0_sock_ops,
.proto_pipe_ops = &sub0_pipe_ops,
.proto_ctx_ops = &sub0_ctx_ops,
diff --git a/src/protocol/reqrep0/rep.c b/src/protocol/reqrep0/rep.c
index 2f10d3d6..aa32d249 100644
--- a/src/protocol/reqrep0/rep.c
+++ b/src/protocol/reqrep0/rep.c
@@ -692,7 +692,7 @@ static nni_proto rep0_proto = {
.proto_version = NNI_PROTOCOL_VERSION,
.proto_self = { NNG_REP0_SELF, NNG_REP0_SELF_NAME },
.proto_peer = { NNG_REP0_PEER, NNG_REP0_PEER_NAME },
- .proto_flags = NNI_PROTO_FLAG_SNDRCV | NNI_PROTO_FLAG_NOMSGQ,
+ .proto_flags = NNI_PROTO_FLAG_SNDRCV,
.proto_sock_ops = &rep0_sock_ops,
.proto_pipe_ops = &rep0_pipe_ops,
.proto_ctx_ops = &rep0_ctx_ops,
diff --git a/src/protocol/reqrep0/req.c b/src/protocol/reqrep0/req.c
index fc12cb89..cb3c9395 100644
--- a/src/protocol/reqrep0/req.c
+++ b/src/protocol/reqrep0/req.c
@@ -856,7 +856,7 @@ static nni_proto req0_proto = {
.proto_version = NNI_PROTOCOL_VERSION,
.proto_self = { NNG_REQ0_SELF, NNG_REQ0_SELF_NAME },
.proto_peer = { NNG_REQ0_PEER, NNG_REQ0_PEER_NAME },
- .proto_flags = NNI_PROTO_FLAG_SNDRCV | NNI_PROTO_FLAG_NOMSGQ,
+ .proto_flags = NNI_PROTO_FLAG_SNDRCV,
.proto_sock_ops = &req0_sock_ops,
.proto_pipe_ops = &req0_pipe_ops,
.proto_ctx_ops = &req0_ctx_ops,
diff --git a/src/protocol/survey0/respond.c b/src/protocol/survey0/respond.c
index 993e3243..ad551c8f 100644
--- a/src/protocol/survey0/respond.c
+++ b/src/protocol/survey0/respond.c
@@ -680,7 +680,7 @@ static nni_proto resp0_proto = {
.proto_version = NNI_PROTOCOL_VERSION,
.proto_self = { NNI_PROTO_RESPONDENT_V0, "respondent" },
.proto_peer = { NNI_PROTO_SURVEYOR_V0, "surveyor" },
- .proto_flags = NNI_PROTO_FLAG_SNDRCV | NNI_PROTO_FLAG_NOMSGQ,
+ .proto_flags = NNI_PROTO_FLAG_SNDRCV,
.proto_sock_ops = &resp0_sock_ops,
.proto_pipe_ops = &resp0_pipe_ops,
.proto_ctx_ops = &resp0_ctx_ops,
diff --git a/src/protocol/survey0/survey.c b/src/protocol/survey0/survey.c
index f2cc8aa8..ce1ed601 100644
--- a/src/protocol/survey0/survey.c
+++ b/src/protocol/survey0/survey.c
@@ -650,7 +650,7 @@ static nni_proto surv0_proto = {
.proto_version = NNI_PROTOCOL_VERSION,
.proto_self = { NNG_SURVEYOR0_SELF, NNG_SURVEYOR0_SELF_NAME },
.proto_peer = { NNG_SURVEYOR0_PEER, NNG_SURVEYOR0_PEER_NAME },
- .proto_flags = NNI_PROTO_FLAG_SNDRCV | NNI_PROTO_FLAG_NOMSGQ,
+ .proto_flags = NNI_PROTO_FLAG_SNDRCV,
.proto_sock_ops = &surv0_sock_ops,
.proto_pipe_ops = &surv0_pipe_ops,
.proto_ctx_ops = &surv0_ctx_ops,