diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-06-29 14:41:33 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-06-29 14:41:33 +0000 |
commit | ce7d19470fc5d7dd384fe157a7e6a7b0b08ecc8e (patch) | |
tree | 912c2a8b1ebb810cfe74e769ec754a40795bb3fe /ace/FIFO_Recv_Msg.i | |
parent | 96de322badba1125c530d5be9cbcb4fcd5c6c41d (diff) | |
download | ATCD-ce7d19470fc5d7dd384fe157a7e6a7b0b08ecc8e.tar.gz |
ChangeLogTag:Wed Jun 27 12:00:34 2001 Douglas C. Schmidt <schmidt@tango.doc.wustl.edu>
Diffstat (limited to 'ace/FIFO_Recv_Msg.i')
-rw-r--r-- | ace/FIFO_Recv_Msg.i | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/ace/FIFO_Recv_Msg.i b/ace/FIFO_Recv_Msg.i index dce1d06e29a..e47c0beef3e 100644 --- a/ace/FIFO_Recv_Msg.i +++ b/ace/FIFO_Recv_Msg.i @@ -13,10 +13,13 @@ ACE_FIFO_Recv_Msg::recv (ACE_Str_Buf &recv_msg) ACE_TRACE ("ACE_FIFO_Recv_Msg::recv"); #if defined (ACE_HAS_STREAM_PIPES) int i = 0; - return ACE_OS::getmsg (this->get_handle (), - (strbuf *) 0, - (strbuf *) &recv_msg, - &i); + if (ACE_OS::getmsg (this->get_handle (), + (strbuf *) 0, + (strbuf *) &recv_msg, + &i) == -1) + return -1; + else + return recv_msg.len; #else /* Do the ol' 2-read trick... */ if (ACE_OS::read (this->get_handle (), (char *) &recv_msg.len, @@ -45,10 +48,13 @@ ACE_FIFO_Recv_Msg::recv (ACE_Str_Buf *data, int *flags) { ACE_TRACE ("ACE_FIFO_Recv_Msg::recv"); - return ACE_OS::getmsg (this->get_handle (), - (strbuf *) cntl, - (strbuf *) data, - flags); + if (ACE_OS::getmsg (this->get_handle (), + (strbuf *) cntl, + (strbuf *) data, + flags) == -1) + return -1; + else + return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len); } ASYS_INLINE ssize_t @@ -58,10 +64,13 @@ ACE_FIFO_Recv_Msg::recv (int *band, int *flags) { ACE_TRACE ("ACE_FIFO_Recv_Msg::recv"); - return ACE_OS::getpmsg (this->get_handle (), - (strbuf *) cntl, - (strbuf *) data, - band, - flags); + if (ACE_OS::getpmsg (this->get_handle (), + (strbuf *) cntl, + (strbuf *) data, + band, + flags) == -1) + return -1; + else + return (cntl == 0 ? 0 : cntl->len) + (data == 0 ? 0 : data->len); } #endif /* ACE_HAS_STREAM_PIPES */ |