summaryrefslogtreecommitdiff
path: root/perf
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-04-21 07:07:57 +0200
committerMartin Sustrik <sustrik@250bpm.com>2012-04-21 07:07:57 +0200
commit36fd87810274329c8cd86344b95a0521541e7bab (patch)
treeec183c7dd3a9b1de3361e7211cbffc960d139cf1 /perf
parentd26e86aa0afc3ec2534eacb4131aee8f6805c36a (diff)
xs_shutdown implemented
This patch allows for partial shutdown of the socket. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'perf')
-rw-r--r--perf/inproc_lat.cpp4
-rw-r--r--perf/inproc_thr.cpp4
-rw-r--r--perf/local_lat.cpp2
-rw-r--r--perf/local_thr.cpp2
-rw-r--r--perf/remote_lat.cpp2
-rw-r--r--perf/remote_thr.cpp2
6 files changed, 8 insertions, 8 deletions
diff --git a/perf/inproc_lat.cpp b/perf/inproc_lat.cpp
index fc0b76b..54973db 100644
--- a/perf/inproc_lat.cpp
+++ b/perf/inproc_lat.cpp
@@ -55,7 +55,7 @@ static void *worker (void *ctx_)
}
rc = xs_connect (s, "inproc://lat_test");
- if (rc != 0) {
+ if (rc == -1) {
printf ("error in xs_connect: %s\n", xs_strerror (errno));
exit (1);
}
@@ -135,7 +135,7 @@ int main (int argc, char *argv [])
}
rc = xs_bind (s, "inproc://lat_test");
- if (rc != 0) {
+ if (rc == -1) {
printf ("error in xs_bind: %s\n", xs_strerror (errno));
return -1;
}
diff --git a/perf/inproc_thr.cpp b/perf/inproc_thr.cpp
index 91f1df4..570d87e 100644
--- a/perf/inproc_thr.cpp
+++ b/perf/inproc_thr.cpp
@@ -55,7 +55,7 @@ static void *worker (void *ctx_)
}
rc = xs_connect (s, "inproc://thr_test");
- if (rc != 0) {
+ if (rc == -1) {
printf ("error in xs_connect: %s\n", xs_strerror (errno));
exit (1);
}
@@ -134,7 +134,7 @@ int main (int argc, char *argv [])
}
rc = xs_bind (s, "inproc://thr_test");
- if (rc != 0) {
+ if (rc == -1) {
printf ("error in xs_bind: %s\n", xs_strerror (errno));
return -1;
}
diff --git a/perf/local_lat.cpp b/perf/local_lat.cpp
index 3dd1c8c..1fcf3f4 100644
--- a/perf/local_lat.cpp
+++ b/perf/local_lat.cpp
@@ -56,7 +56,7 @@ int main (int argc, char *argv [])
}
rc = xs_bind (s, bind_to);
- if (rc != 0) {
+ if (rc == -1) {
printf ("error in xs_bind: %s\n", xs_strerror (errno));
return -1;
}
diff --git a/perf/local_thr.cpp b/perf/local_thr.cpp
index 40fdbec..5a9e6f1 100644
--- a/perf/local_thr.cpp
+++ b/perf/local_thr.cpp
@@ -62,7 +62,7 @@ int main (int argc, char *argv [])
// For example XS_RATE, XS_RECOVERY_IVL and XS_MCAST_LOOP for PGM.
rc = xs_bind (s, bind_to);
- if (rc != 0) {
+ if (rc == -1) {
printf ("error in xs_bind: %s\n", xs_strerror (errno));
return -1;
}
diff --git a/perf/remote_lat.cpp b/perf/remote_lat.cpp
index 0f05d2a..6aaf1e9 100644
--- a/perf/remote_lat.cpp
+++ b/perf/remote_lat.cpp
@@ -60,7 +60,7 @@ int main (int argc, char *argv [])
}
rc = xs_connect (s, connect_to);
- if (rc != 0) {
+ if (rc == -1) {
printf ("error in xs_connect: %s\n", xs_strerror (errno));
return -1;
}
diff --git a/perf/remote_thr.cpp b/perf/remote_thr.cpp
index fe4bbfa..b93c4d7 100644
--- a/perf/remote_thr.cpp
+++ b/perf/remote_thr.cpp
@@ -60,7 +60,7 @@ int main (int argc, char *argv [])
// For example XS_RATE, XS_RECOVERY_IVL and XS_MCAST_LOOP for PGM.
rc = xs_connect (s, connect_to);
- if (rc != 0) {
+ if (rc == -1) {
printf ("error in xs_connect: %s\n", xs_strerror (errno));
return -1;
}