0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 15:41:05 +08:00

Fix for signaler_t on HP-UX and AIX platforms

This commit is contained in:
Bernd Melchers 2010-09-02 07:33:57 +02:00 committed by Martin Sustrik
parent d5b6f680a5
commit 8ec0743c75
2 changed files with 4 additions and 3 deletions

View File

@ -5,6 +5,7 @@ Alexej Lotz <alexej.lotz@arcor.de>
Asko Kauppi <askok@dnainternet.net> Asko Kauppi <askok@dnainternet.net>
Barak Amar <barak.amar@gmail.com> Barak Amar <barak.amar@gmail.com>
Bernd Prager <bernd@prager.ws> Bernd Prager <bernd@prager.ws>
Bernd Melchers <melchers@ZEDAT.FU-Berlin.DE>
Brian Buchanan <bwb@holo.org> Brian Buchanan <bwb@holo.org>
Chris Wong <chris@chriswongstudio.com> Chris Wong <chris@chriswongstudio.com>
Conrad D. Steenberg <conrad.steenberg@caltech.edu> Conrad D. Steenberg <conrad.steenberg@caltech.edu>

View File

@ -184,7 +184,7 @@ void zmq::signaler_t::send (const command_t &cmd_)
zmq_assert (nbytes == sizeof (command_t)); zmq_assert (nbytes == sizeof (command_t));
} }
bool zmq::signaler_t::recv (command_t &cmd_, bool block_) bool zmq::signaler_t::recv (command_t *cmd_, bool block_)
{ {
if (block_) { if (block_) {
@ -199,7 +199,7 @@ bool zmq::signaler_t::recv (command_t &cmd_, bool block_)
bool result; bool result;
ssize_t nbytes; ssize_t nbytes;
do { do {
nbytes = ::recv (r, buffer, sizeof (command_t), 0); nbytes = ::recv (r, (char*) cmd_, sizeof (command_t), 0);
} while (nbytes == -1 && errno == EINTR); } while (nbytes == -1 && errno == EINTR);
if (nbytes == -1 && errno == EAGAIN) { if (nbytes == -1 && errno == EAGAIN) {
result = false; result = false;
@ -213,7 +213,7 @@ bool zmq::signaler_t::recv (command_t &cmd_, bool block_)
result = true; result = true;
} }
if (block_) if (block_) {
// Set the reader to non-blocking mode. // Set the reader to non-blocking mode.
int flags = fcntl (r, F_GETFL, 0); int flags = fcntl (r, F_GETFL, 0);