Commit 5e288699 authored by John Selbie's avatar John Selbie

Fix CStunSocket::SetNonBlocking to accept false as param (benign bug)

parent 7c2c0528
# BOOST_INCLUDE := -I/home/jselbie/boost_1_48_0
BOOST_INCLUDE := -I/home/jselbie/boost_1_48_0
# OPENSSL_INCLUDE := -I/home/jselbie/lib/openssl
DEFINES := -DNDEBUG
......
......@@ -203,8 +203,15 @@ HRESULT CStunSocket::SetNonBlocking(bool fEnable)
flags = ::fcntl(_sock, F_GETFL, 0);
ChkIf(flags == -1, ERRNOHR);
flags |= O_NONBLOCK;
if (fEnable)
{
flags |= O_NONBLOCK;
}
else
{
flags &= ~(O_NONBLOCK);
}
result = fcntl(_sock , F_SETFL , flags);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment