aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/survey0/xrespond_test.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-01-20 23:31:55 -0800
committerGarrett D'Amore <garrett@damore.org>2020-01-20 23:35:08 -0800
commit38c005e7c07b5ccaab3345dc8c66cbc27b95692a (patch)
tree7d35c74df9f0f320942e6c8c601e963a4cc11741 /src/protocol/survey0/xrespond_test.c
parent058ad941dc55ad6288f6b07f4cdf237fd13f1a93 (diff)
downloadnng-38c005e7c07b5ccaab3345dc8c66cbc27b95692a.tar.gz
nng-38c005e7c07b5ccaab3345dc8c66cbc27b95692a.tar.bz2
nng-38c005e7c07b5ccaab3345dc8c66cbc27b95692a.zip
fixes #1169 survey and xsurvey could use message cloning
fixes #1160 Consider limiting maximum hop count to 15 fixes #1098 Maximum maxTTL should be compile time defined This doesn't expose the max-MaxTTL in the CMakeList.txt -- there is really no reason anyone should be changing it. This does not yet inline the message header into the nni_msg_t, but it is my intention to do so soon, and eliminate most of the conditional cases for failure on inserting into the header.
Diffstat (limited to 'src/protocol/survey0/xrespond_test.c')
-rw-r--r--src/protocol/survey0/xrespond_test.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/protocol/survey0/xrespond_test.c b/src/protocol/survey0/xrespond_test.c
index eec5c4a6..342c8a94 100644
--- a/src/protocol/survey0/xrespond_test.c
+++ b/src/protocol/survey0/xrespond_test.c
@@ -337,6 +337,7 @@ test_xresp_ttl_option(void)
TEST_NNG_PASS(nng_setopt_int(resp, opt, 1));
TEST_NNG_FAIL(nng_setopt_int(resp, opt, 0), NNG_EINVAL);
TEST_NNG_FAIL(nng_setopt_int(resp, opt, -1), NNG_EINVAL);
+ TEST_NNG_FAIL(nng_setopt_int(resp, opt, 16), NNG_EINVAL);
TEST_NNG_FAIL(nng_setopt_int(resp, opt, 256), NNG_EINVAL);
TEST_NNG_PASS(nng_setopt_int(resp, opt, 3));
TEST_NNG_PASS(nng_getopt_int(resp, opt, &v));
@@ -428,8 +429,10 @@ TEST_LIST = {
{ "xrespond poll readable", test_xresp_poll_readable },
{ "xrespond poll writable", test_xresp_poll_writeable },
{ "xrespond validate peer", test_xresp_validate_peer },
- { "xrespond close pipe before send", test_xresp_close_pipe_before_send },
- { "xrespond close pipe during send", test_xresp_close_pipe_during_send },
+ { "xrespond close pipe before send",
+ test_xresp_close_pipe_before_send },
+ { "xrespond close pipe during send",
+ test_xresp_close_pipe_during_send },
{ "xrespond close during recv", test_xresp_close_during_recv },
{ "xrespond recv aio stopped", test_xresp_recv_aio_stopped },
{ "xrespond send no header", test_xresp_send_no_header },