gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r32329 - libmicrohttpd/src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r32329 - libmicrohttpd/src/microhttpd
Date: Wed, 12 Feb 2014 17:44:27 +0100

Author: grothoff
Date: 2014-02-12 17:44:27 +0100 (Wed, 12 Feb 2014)
New Revision: 32329

Modified:
   libmicrohttpd/src/microhttpd/daemon.c
Log:
refactoring and cleanup of make_nonblocking_noninheritable(),
based on suggestions by Karlson2k <address@hidden>
(but not exactly)


Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c       2014-02-12 16:38:18 UTC (rev 
32328)
+++ libmicrohttpd/src/microhttpd/daemon.c       2014-02-12 16:44:27 UTC (rev 
32329)
@@ -1,6 +1,6 @@
 /*
   This file is part of libmicrohttpd
-  (C) 2007-2013 Daniel Pittman and Christian Grothoff
+  (C) 2007-2014 Daniel Pittman and Christian Grothoff
 
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
@@ -1573,18 +1573,6 @@
 make_nonblocking_noninheritable (struct MHD_Daemon *daemon,
                                 int sock)
 {
-  int nonblock;
-
-#ifdef HAVE_SOCK_NONBLOCK
-  nonblock = SOCK_NONBLOCK;
-#else
-  nonblock = 0;
-#endif
-#ifdef CYGWIN
-  if (0 == (daemon->options & MHD_USE_SSL))
-    nonblock = 0;
-#endif
-
 #ifdef WINDOWS
   DWORD dwFlags;
   unsigned long flags = 1;
@@ -1610,6 +1598,7 @@
     }
 #else
   int flags;
+  int nonblock;
 
   nonblock = O_NONBLOCK;
 #ifdef CYGWIN
@@ -1736,7 +1725,7 @@
         }
       return MHD_NO;
     }
-#if !defined(HAVE_ACCEPT4) || SOCK_CLOEXEC+0 == 0
+#if !defined(HAVE_ACCEPT4) || !defined(HAVE_SOCK_NONBLOCK) || SOCK_CLOEXEC+0 
== 0
   make_nonblocking_noninheritable (daemon, s);
 #endif
 #if HAVE_MESSAGES




reply via email to

[Prev in Thread] Current Thread [Next in Thread]