From e136d923b7060ef64d44264f88e49057e6638f31 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 22 Sep 2009 11:52:35 +0200 Subject: ZMQ-specific error codes added --- src/req.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/req.cpp') diff --git a/src/req.cpp b/src/req.cpp index 9b4dffa..3fd9b38 100644 --- a/src/req.cpp +++ b/src/req.cpp @@ -120,12 +120,12 @@ int zmq::req_t::xsend (struct zmq_msg_t *msg_, int flags_) // If we've sent a request and we still haven't got the reply, // we can't send another request. if (waiting_for_reply) { - errno = EFAULT; + errno = EFSM; return -1; } if (out_pipes.empty ()) { - errno = EFAULT; + errno = EAGAIN; return -1; } @@ -166,7 +166,7 @@ int zmq::req_t::xsend (struct zmq_msg_t *msg_, int flags_) int zmq::req_t::xflush () { - errno = EFAULT; + errno = ENOTSUP; return -1; } @@ -178,7 +178,7 @@ int zmq::req_t::xrecv (struct zmq_msg_t *msg_, int flags_) // If request wasn't send, we can't wait for reply. if (!waiting_for_reply) { zmq_msg_init (msg_); - errno = EFAULT; + errno = EFSM; return -1; } -- cgit v1.2.3