diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2011-02-22 16:23:36 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2011-02-22 16:23:36 +0100 |
commit | 43e8868875e1d5287979e5b9060a9b16be45cc79 (patch) | |
tree | d6df0587b107de28641b429048dff002e3c2387f /src/object.cpp | |
parent | 98ccff1a24a056aef15372b131eee1c1bf8f62ca (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.cpp | 4 |
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 ()); } |