aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/survey0/survey.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-02-05 00:17:52 -0800
committerGarrett D'Amore <garrett@damore.org>2020-02-05 00:31:11 -0800
commitb46d532dc90b52eec42376e8c75bed5c6c7416a4 (patch)
treea93bffc9e0643190648a770ad96af43a4f00a4e7 /src/protocol/survey0/survey.c
parentbd13268f356f83d541c4bce09eae02287d4ddbd9 (diff)
downloadnng-b46d532dc90b52eec42376e8c75bed5c6c7416a4.tar.gz
nng-b46d532dc90b52eec42376e8c75bed5c6c7416a4.tar.bz2
nng-b46d532dc90b52eec42376e8c75bed5c6c7416a4.zip
Survey test rewrite.
This bumps the coverage for survey up. While here fixed a few nits in req test, and removed the now pointless legacy survey and respond tests.
Diffstat (limited to 'src/protocol/survey0/survey.c')
-rw-r--r--src/protocol/survey0/survey.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/protocol/survey0/survey.c b/src/protocol/survey0/survey.c
index dcf92e07..999b8a56 100644
--- a/src/protocol/survey0/survey.c
+++ b/src/protocol/survey0/survey.c
@@ -384,12 +384,7 @@ surv0_pipe_recv_cb(void *arg)
return;
}
id = nni_msg_trim_u32(msg);
- if (nni_msg_header_append_u32(msg, id) != 0) {
- // Should be NNG_ENOMEM - discard and try again.
- nni_msg_free(msg);
- nni_pipe_recv(p->npipe, p->aio_recv);
- return;
- }
+ nni_msg_header_must_append_u32(msg ,id);
nni_mtx_lock(&sock->mtx);