[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22636 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22636 - gnunet/src/util |
Date: |
Fri, 13 Jul 2012 18:24:27 +0200 |
Author: LRN
Date: 2012-07-13 18:24:27 +0200 (Fri, 13 Jul 2012)
New Revision: 22636
Modified:
gnunet/src/util/network.c
Log:
Safer handling of corner-cases in w32 select
Modified: gnunet/src/util/network.c
===================================================================
--- gnunet/src/util/network.c 2012-07-13 15:35:41 UTC (rev 22635)
+++ gnunet/src/util/network.c 2012-07-13 16:24:27 UTC (rev 22636)
@@ -1523,10 +1523,22 @@
LOG (GNUNET_ERROR_TYPE_DEBUG, "nfds: %d, handles: %d, will wait: %llu ms\n",
nfds, nhandles, (unsigned long long) ms_total);
if (nhandles)
+ {
returncode =
WaitForMultipleObjects (nhandles, handle_array, FALSE, ms_total);
- LOG (GNUNET_ERROR_TYPE_DEBUG, "WaitForMultipleObjects Returned : %d\n",
- returncode);
+ LOG (GNUNET_ERROR_TYPE_DEBUG, "WaitForMultipleObjects Returned : %d\n",
+ returncode);
+ }
+ else if (nfds > 0)
+ {
+ i = (int) WaitForSingleObject (select_finished_event, INFINITE);
+ returncode = WAIT_TIMEOUT;
+ }
+ else
+ {
+ /* Shouldn't come this far. If it does - investigate. */
+ GNUNET_assert (0);
+ }
if (nfds > 0)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22636 - gnunet/src/util,
gnunet <=