libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] Remove PlibC from autotools files


From: LRN
Subject: Re: [libmicrohttpd] Remove PlibC from autotools files
Date: Thu, 08 Aug 2013 00:52:16 +0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Thunderbird/25.0a1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08.08.2013 00:31, Michael Cronenworth wrote:
> On 08/07/2013 03:28 PM, LRN wrote:
>> I suspect that there are more patches that are missing in your messages...
> 
> I never sent all of the patches to this list. I sent them all to Christian. 
> I'm
> not sure what he has done with them

Apparently, he pushed them into svn. I've looked them up more closely,
and i see this:

+#ifndef WINDOWS
   if (-1 != daemon->wpipe[0])
     {
       FD_SET (daemon->wpipe[0], &rs);
@@ -1727,12 +1763,18 @@
       if (max < daemon->wpipe[0])
        max = daemon->wpipe[0];
     }
+#endif

...

- -  num_ready = SELECT (max + 1, &rs, &ws, &es, tv);
+#ifdef WINDOWS
+  if (tv == NULL)
+    {
+      timeout.tv_usec = 100000;
+      timeout.tv_sec = 0;
+      tv = &timeout;
+    }
+#endif
+  num_ready = select (max + 1, &rs, &ws, &es, tv);

...

+#ifdef WINDOWS
+  if (num_ready == 0) {
+    if (-1 != daemon->wpipe[0])
+      {
+        if (! PeekNamedPipe((HANDLE) daemon->wpipe[0], NULL, 0, NULL,
&dwBytes, NULL))
+          {
+            goto loop_select;
+          }
+        else if (dwBytes)
+          FD_SET (daemon->wpipe[0], &rs);
+        else
+          goto loop_select;
+      }
+    else
+      goto loop_select;
+  }
+#endif
+
   return MHD_run_from_select (daemon, &rs, &ws, &es);

That is, pipe is only checked if none of the sockets are ready, and is
only checked AFTER select() returns. In case tv is NULL (and thus
select() will never time out) you're setting timeout to a small value
and alternating between select() and PeekNamedPipe(). But in your next
path (that you did send to ML) you've removed the loop_select loop...

I'm not sure how that is supposed to work.

- -- 
O< ascii ribbon - stop html email! - www.asciiribbon.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)

iQEcBAEBAgAGBQJSArOAAAoJEOs4Jb6SI2CwdBQH/2EHMjQEmEZBy5/0bhgS73iJ
YPjyoUGlHw2zEVhFANLuUibDpvNL02IgtaQhkceUB2W74SOU3CvIf3i4iPkt7FTJ
R+p5wG2UyBThnwWPwG2eaB0Vp9T0Xq6f/DJXAaot1/POOKYpipCFiKphLuPRAXWe
uGMtafbzrURpU9AwPQ7TXEZGFLOLJgKoAhlUQMX7zN4DUbcFSMwtj2hz2d8SC7oI
Lzs+9ZOOTda7qal/t1c4x5SgY4TmK00QthYcSes3vITCUaS5G83acP9koasLSDn0
YvyVf5iDV+Vo12cIJF8xik+mO3d9IHXl1gjRm3/FAYiLLXhUZK76fu0ezn4mIjc=
=fDvI
-----END PGP SIGNATURE-----



reply via email to

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