* fix setting of nonblocking IO
authorWilfried Göesgens <willi@citadel.org>
Sat, 3 Oct 2009 17:57:14 +0000 (17:57 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 3 Oct 2009 17:57:14 +0000 (17:57 +0000)
webcit/webserver.c

index c3263ecb7820fb1d4e5abbf4197087aa60021aeb..67642f58d8f6e376f8b05e2a703400f5fe3c3ca2 100644 (file)
@@ -708,6 +708,7 @@ void worker_entry(void)
                                }
                        }
                        else 
+#endif
                        {
                                int fdflags; 
                                fdflags = fcntl(ssock, F_GETFL);
@@ -715,11 +716,10 @@ void worker_entry(void)
                                        lprintf(1, "unable to get server socket flags! %s \n",
                                                strerror(errno));
                                fdflags = fdflags | O_NONBLOCK;
-                               if (fcntl(ssock, F_SETFD, fdflags) < 0)
+                               if (fcntl(ssock, F_SETFL, fdflags) < 0)
                                        lprintf(1, "unable to set server socket nonblocking flags! %s \n",
                                                strerror(errno));
                        }
-#endif
 
                        if (fail_this_transaction == 0) {
                                Hdr.http_sock = ssock;