diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-07-30 19:53:46 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-07-30 19:53:46 +0000 |
commit | ef456abb03024f771cc139508bd9134360436611 (patch) | |
tree | 93f66a0964a2ef196342b0a56f4152491d61d9a0 /ace/SOCK_Dgram.cpp | |
parent | 20da3b41a83be08b1a04ecfb0a7539587bf795cb (diff) | |
download | ATCD-ef456abb03024f771cc139508bd9134360436611.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/SOCK_Dgram.cpp')
-rw-r--r-- | ace/SOCK_Dgram.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/ace/SOCK_Dgram.cpp b/ace/SOCK_Dgram.cpp index df424d6bffa..e0ad3a96973 100644 --- a/ace/SOCK_Dgram.cpp +++ b/ace/SOCK_Dgram.cpp @@ -298,12 +298,20 @@ ACE_SOCK_Dgram::recv (void *buf, handle_set.set_bit (this->get_handle ()); // Check the status of the current socket. - int result = ACE_OS::select (int (this->get_handle ()) + 1, - handle_set, - 0, 0, - timeout); - if (result <= 0) // Other error (-1) or timeout (0). - return result; - else // Goes fine, call <recv> to get data - return this->recv (buf, n, addr, flags); + switch (ACE_OS::select (int (this->get_handle ()) + 1, + handle_set, + 0, 0, + timeout)) + { + case -1: + return -1; + /* NOTREACHED */ + case 0: + errno = ETIME; + return -1; + /* NOTREACHED */ + default: + // Goes fine, call <recv> to get data + return this->recv (buf, n, addr, flags); + } } |