summaryrefslogtreecommitdiff
path: root/src/object.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-02-22 16:23:36 +0100
committerMartin Sustrik <sustrik@250bpm.com>2011-02-22 16:23:36 +0100
commit43e8868875e1d5287979e5b9060a9b16be45cc79 (patch)
treed6df0587b107de28641b429048dff002e3c2387f /src/object.cpp
parent98ccff1a24a056aef15372b131eee1c1bf8f62ca (diff)
Added explicit error message in case of memory exhaustion
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/object.cpp')
-rw-r--r--src/object.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/object.cpp b/src/object.cpp
index 1376699..44da647 100644
--- a/src/object.cpp
+++ b/src/object.cpp
@@ -228,7 +228,7 @@ void zmq::object_t::send_attach (session_t *destination_, i_engine *engine_,
(unsigned char) peer_identity_.size ();
cmd.args.attach.peer_identity =
(unsigned char*) malloc (peer_identity_.size ());
- zmq_assert (cmd.args.attach.peer_identity_size);
+ alloc_assert (cmd.args.attach.peer_identity_size);
memcpy (cmd.args.attach.peer_identity, peer_identity_.data (),
peer_identity_.size ());
}
@@ -259,7 +259,7 @@ void zmq::object_t::send_bind (own_t *destination_, reader_t *in_pipe_,
(unsigned char) peer_identity_.size ();
cmd.args.bind.peer_identity =
(unsigned char*) malloc (peer_identity_.size ());
- zmq_assert (cmd.args.bind.peer_identity_size);
+ alloc_assert (cmd.args.bind.peer_identity_size);
memcpy (cmd.args.bind.peer_identity, peer_identity_.data (),
peer_identity_.size ());
}