[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22249 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22249 - gnunet/src/util |
Date: |
Sun, 24 Jun 2012 10:53:12 +0200 |
Author: grothoff
Date: 2012-06-24 10:53:12 +0200 (Sun, 24 Jun 2012)
New Revision: 22249
Modified:
gnunet/src/util/network.c
Log:
-LRN: Log timeouts that are bigger than DWORD; fix format string
Modified: gnunet/src/util/network.c
===================================================================
--- gnunet/src/util/network.c 2012-06-24 08:51:46 UTC (rev 22248)
+++ gnunet/src/util/network.c 2012-06-24 08:53:12 UTC (rev 22249)
@@ -1296,7 +1296,14 @@
if (timeout.rel_value == GNUNET_TIME_UNIT_FOREVER_REL.rel_value)
ms_total = INFINITE;
else
+ {
ms_total = timeout.rel_value / GNUNET_TIME_UNIT_MILLISECONDS.rel_value;
+ if (timeout.rel_value / GNUNET_TIME_UNIT_MILLISECONDS.rel_value >
0xFFFFFFFFLL - 1)
+ {
+ GNUNET_break (0);
+ ms_total = 0xFFFFFFFF - 1;
+ }
+ }
/* select() may be used as a portable way to sleep */
if (!(rfds || wfds || efds))
{
@@ -1513,8 +1520,8 @@
}
handle_array[nhandles] = NULL;
- LOG (GNUNET_ERROR_TYPE_DEBUG, "nfds: %d, handles: %d, will wait: %d ms\n",
- nfds, nhandles, ms_total);
+ 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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22249 - gnunet/src/util,
gnunet <=