summaryrefslogtreecommitdiff
path: root/src/socket_base.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-05-31 09:09:43 +0200
committerMartin Sustrik <sustrik@250bpm.com>2012-06-01 11:02:35 +0200
commit58d54740785eb2c7208a01afb5bd9736e5808069 (patch)
tree19d24c817201842b3781328d5f1a5fb25138a496 /src/socket_base.cpp
parentf84ebfdbc64b774b1f00f5b98494e66b8a88fb0b (diff)
Assertions improved
This patch is replaces generic xs_asserts by errno_assers and alloc_asserts as appropriate. It is based on 0MQ patch by Martin Hurton. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/socket_base.cpp')
-rw-r--r--src/socket_base.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/socket_base.cpp b/src/socket_base.cpp
index 960bd2c..9de8735 100644
--- a/src/socket_base.cpp
+++ b/src/socket_base.cpp
@@ -461,7 +461,7 @@ int xs::socket_base_t::connect (const char *addr_)
if (options.send_identity) {
msg_t id;
rc = id.init_size (options.identity_size);
- xs_assert (rc == 0);
+ errno_assert (rc == 0);
memcpy (id.data (), options.identity, options.identity_size);
id.set_flags (msg_t::identity);
bool written = ppair [0]->write (&id);
@@ -473,7 +473,7 @@ int xs::socket_base_t::connect (const char *addr_)
if (peer.options.send_identity) {
msg_t id;
rc = id.init_size (peer.options.identity_size);
- xs_assert (rc == 0);
+ errno_assert (rc == 0);
memcpy (id.data (), peer.options.identity,
peer.options.identity_size);
id.set_flags (msg_t::identity);