From 491f1c1a5a209545287f9cc79f59ee816f5b9a41 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 7 Aug 2017 18:16:54 -0700 Subject: Fix crash when using legacy send API with NN_MSG. We introduced the compat_msg.c from the old msg.c in the nanomsg repo. While here, we found that the handling for send() was badly wrong, by a level of indirection. We simplified the code to so that nn_send() and nn_recv() are simple wrappers around the nn_sendmsg() and nn_recvmsg() APIs (as in old nanomsg). This may not be quite as fast, but it's more likely to be correct and reduces complexity. --- tests/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/CMakeLists.txt') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5dcc1379..47c086d2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,8 +2,9 @@ # Copyright (c) 2012 Martin Sustrik All rights reserved. # Copyright (c) 2013 GoPivotal, Inc. All rights reserved. # Copyright (c) 2015-2016 Jack R. Dunaway. All rights reserved. -# Copyright 2017 Garrett D'Amore # Copyright 2016 Franklin "Snaipe" Mathieu +# Copyright 2017 Garrett D'Amore +# Copyright 2017 Capitar IT Group BV # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), @@ -60,7 +61,7 @@ if (NNG_TESTS) target_link_libraries (${NAME} "${CMAKE_THREAD_LIBS_INIT}") endif() - add_test (NAME ${NAME} COMMAND ${NAME} -v ${TEST_PORT}) + add_test (NAME ${NAME} COMMAND ${NAME} ${TEST_PORT}) set_tests_properties (${NAME} PROPERTIES TIMEOUT ${TIMEOUT}) math (EXPR TEST_PORT "${TEST_PORT}+10") endmacro (add_nng_compat_test) @@ -92,5 +93,6 @@ add_nng_compat_test(compat_block 5) add_nng_compat_test(compat_bug777 5) add_nng_compat_test(compat_bus 5) add_nng_compat_test(compat_cmsg 5) +add_nng_compat_test(compat_msg 5) add_nng_compat_test(compat_device 5) add_nng_compat_test(compat_reqrep 5) -- cgit v1.2.3-70-g09d2