aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-tcp-stream-raw.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-08-29 11:40:07 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-08-29 11:40:07 +0800
commitbb98624d59134164487563b8b85721e036a0dfdc (patch)
tree6224655e593172a8b032cfbb741271cf496f6b65 /camel/camel-tcp-stream-raw.c
parent7e0ae5059b00da3905fc3a9edb4fd9eac2897613 (diff)
downloadgsoc2013-evolution-bb98624d59134164487563b8b85721e036a0dfdc.tar.gz
gsoc2013-evolution-bb98624d59134164487563b8b85721e036a0dfdc.tar.zst
gsoc2013-evolution-bb98624d59134164487563b8b85721e036a0dfdc.zip
Fixed `set' to hold the correct value when setting the flags.
2002-08-28 Jeffrey Stedfast <fejj@ximian.com> * camel-tcp-stream-raw.c (stream_setsockopt): Fixed `set' to hold the correct value when setting the flags. svn path=/trunk/; revision=17911
Diffstat (limited to 'camel/camel-tcp-stream-raw.c')
-rw-r--r--camel/camel-tcp-stream-raw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/camel/camel-tcp-stream-raw.c b/camel/camel-tcp-stream-raw.c
index b8e6426c49..fc4b5b53d0 100644
--- a/camel/camel-tcp-stream-raw.c
+++ b/camel/camel-tcp-stream-raw.c
@@ -560,7 +560,7 @@ stream_getsockopt (CamelTcpStream *stream, CamelSockOptData *data)
if (flags == -1)
return -1;
- data->value.non_blocking = flags & O_NONBLOCK;
+ data->value.non_blocking = flags & O_NONBLOCK ? TRUE : FALSE;
return 0;
}
@@ -587,7 +587,7 @@ stream_setsockopt (CamelTcpStream *stream, const CamelSockOptData *data)
if (flags == -1)
return -1;
- set = data->value.non_blocking ? 1 : 0;
+ set = data->value.non_blocking ? O_NONBLOCK : 0;
flags = (flags & ~O_NONBLOCK) | (set & O_NONBLOCK);
if (fcntl (((CamelTcpStreamRaw *)stream)->sockfd, F_SETFL, flags) == -1)