From bb98624d59134164487563b8b85721e036a0dfdc Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 29 Aug 2002 03:40:07 +0000 Subject: Fixed `set' to hold the correct value when setting the flags. 2002-08-28 Jeffrey Stedfast * camel-tcp-stream-raw.c (stream_setsockopt): Fixed `set' to hold the correct value when setting the flags. svn path=/trunk/; revision=17911 --- camel/ChangeLog | 3 +++ camel/camel-tcp-stream-raw.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index 95d7d557ff..606363c027 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,8 @@ 2002-08-28 Jeffrey Stedfast + * camel-tcp-stream-raw.c (stream_setsockopt): Fixed `set' to hold + the correct value when setting the flags. + * camel-mime-filter-tohtml.c (is_protocol): Match file: urls too. 2002-08-28 Not Zed 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) -- cgit