summaryrefslogtreecommitdiff
path: root/perf/remote_thr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'perf/remote_thr.cpp')
-rw-r--r--perf/remote_thr.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/perf/remote_thr.cpp b/perf/remote_thr.cpp
index 1e69601..c471481 100644
--- a/perf/remote_thr.cpp
+++ b/perf/remote_thr.cpp
@@ -4,16 +4,16 @@
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
- the terms of the Lesser GNU General Public License as published by
+ the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
0MQ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- Lesser GNU General Public License for more details.
+ GNU Lesser General Public License for more details.
- You should have received a copy of the Lesser GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -21,6 +21,7 @@
#include "../include/zmq_utils.h"
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
int main (int argc, char *argv [])
{
@@ -64,11 +65,16 @@ int main (int argc, char *argv [])
}
for (i = 0; i != message_count; i++) {
+
rc = zmq_msg_init_size (&msg, message_size);
if (rc != 0) {
printf ("error in zmq_msg_init_size: %s\n", zmq_strerror (errno));
return -1;
}
+#if defined ZMQ_MAKE_VALGRIND_HAPPY
+ memset (zmq_msg_data (&msg), 0, message_size);
+#endif
+
rc = zmq_send (s, &msg, 0);
if (rc != 0) {
printf ("error in zmq_send: %s\n", zmq_strerror (errno));
@@ -81,8 +87,6 @@ int main (int argc, char *argv [])
}
}
- zmq_sleep (10);
-
rc = zmq_close (s);
if (rc != 0) {
printf ("error in zmq_close: %s\n", zmq_strerror (errno));