diff options
Diffstat (limited to 'src/socket.cpp')
-rw-r--r-- | src/socket.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/socket.cpp b/src/socket.cpp index a660b30..c01c63a 100644 --- a/src/socket.cpp +++ b/src/socket.cpp | |||
@@ -369,7 +369,7 @@ bool Bu::Socket::isSeekable() | |||
369 | bool Bu::Socket::isBlocking() | 369 | bool Bu::Socket::isBlocking() |
370 | { | 370 | { |
371 | #ifndef WIN32 | 371 | #ifndef WIN32 |
372 | return ((fcntl( nSocket, F_GETFL, 0 ) & O_NONBLOCK) == O_NONBLOCK); | 372 | return ((fcntl( nSocket, F_GETFL, 0 ) & O_NONBLOCK) != O_NONBLOCK); |
373 | #else | 373 | #else |
374 | return false; | 374 | return false; |
375 | #endif | 375 | #endif |
@@ -380,7 +380,7 @@ void Bu::Socket::setBlocking( bool bBlocking ) | |||
380 | #ifndef WIN32 | 380 | #ifndef WIN32 |
381 | if( bBlocking ) | 381 | if( bBlocking ) |
382 | { | 382 | { |
383 | fcntl( nSocket, F_SETFL, fcntl( nSocket, F_GETFL, 0 ) & ~O_NONBLOCK ); | 383 | fcntl( nSocket, F_SETFL, fcntl( nSocket, F_GETFL, 0 ) & (~O_NONBLOCK) ); |
384 | } | 384 | } |
385 | else | 385 | else |
386 | { | 386 | { |