diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2006-06-09 07:15:06 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2006-06-09 07:15:06 +0000 |
commit | 54c3254784dc71e229300a80f6a8c09330e2f49a (patch) | |
tree | ee78d27d1c1382f25e8bda02db6940422966d083 /socketft.cpp | |
parent | 40dbbaffa8e75d23f4c0fd34bc9c082bf74f3533 (diff) | |
download | cryptopp-54c3254784dc71e229300a80f6a8c09330e2f49a.tar.gz |
fix SocketSender::EofSent
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@224 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'socketft.cpp')
-rw-r--r-- | socketft.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/socketft.cpp b/socketft.cpp index 5790502..6c5a8ff 100644 --- a/socketft.cpp +++ b/socketft.cpp @@ -442,7 +442,10 @@ bool SocketSender::EofSent() { WSANETWORKEVENTS events; m_s.CheckAndHandleError_int("WSAEnumNetworkEvents", WSAEnumNetworkEvents(m_s, m_event, &events)); - m_lastResult = (events.lNetworkEvents & FD_CLOSE) ? 1 : 0; + if ((events.lNetworkEvents & FD_CLOSE) != FD_CLOSE) + throw Socket::Err(m_s, "WSAEnumNetworkEvents (FD_CLOSE not present)", E_FAIL); + if (events.iErrorCode[FD_CLOSE_BIT] != 0) + throw Socket::Err(m_s, "FD_CLOSE (via WSAEnumNetworkEvents)", events.iErrorCode[FD_CLOSE_BIT]); m_resultPending = false; } return m_lastResult != 0; |