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.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/perf/remote_thr.cpp b/perf/remote_thr.cpp
index 1e69601..78b8f72 100644
--- a/perf/remote_thr.cpp
+++ b/perf/remote_thr.cpp
@@ -1,19 +1,20 @@
/*
- Copyright (c) 2007-2010 iMatix Corporation
+ Copyright (c) 2007-2011 iMatix Corporation
+ Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
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 +22,7 @@
#include "../include/zmq_utils.h"
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
int main (int argc, char *argv [])
{
@@ -64,11 +66,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 +88,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));