gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r31365 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r31365 - gnunet/src/util
Date: Fri, 13 Dec 2013 16:47:56 +0100

Author: grothoff
Date: 2013-12-13 16:47:56 +0100 (Fri, 13 Dec 2013)
New Revision: 31365

Modified:
   gnunet/src/util/configuration.c
   gnunet/src/util/disk.c
   gnunet/src/util/network.c
Log:
-fix off-by-one so we can also select on FD 0 (stdin)

Modified: gnunet/src/util/configuration.c
===================================================================
--- gnunet/src/util/configuration.c     2013-12-13 15:07:00 UTC (rev 31364)
+++ gnunet/src/util/configuration.c     2013-12-13 15:47:56 UTC (rev 31365)
@@ -328,7 +328,7 @@
     return GNUNET_SYSERR;
   dirty = cfg->dirty;           /* back up value! */
   if (GNUNET_SYSERR ==
-       GNUNET_DISK_file_size (fn, &fs64, GNUNET_YES, GNUNET_YES))
+      GNUNET_DISK_file_size (fn, &fs64, GNUNET_YES, GNUNET_YES))
   {
     LOG (GNUNET_ERROR_TYPE_WARNING,
         "Error while determining the file size of %s\n", fn);

Modified: gnunet/src/util/disk.c
===================================================================
--- gnunet/src/util/disk.c      2013-12-13 15:07:00 UTC (rev 31364)
+++ gnunet/src/util/disk.c      2013-12-13 15:47:56 UTC (rev 31365)
@@ -1611,7 +1611,7 @@
  * @param fh file handle
  * @param unlock_start absolute position from where to unlock
  * @param unlock_end absolute position until where to unlock
- * @return GNUNET_OK on success, GNUNET_SYSERR on error
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
  */
 int
 GNUNET_DISK_file_unlock (struct GNUNET_DISK_FileHandle *fh, off_t unlock_start,

Modified: gnunet/src/util/network.c
===================================================================
--- gnunet/src/util/network.c   2013-12-13 15:07:00 UTC (rev 31364)
+++ gnunet/src/util/network.c   2013-12-13 15:47:56 UTC (rev 31365)
@@ -988,7 +988,7 @@
 #ifndef MINGW
   int nfds;
 
-  for (nfds = src->nsds; nfds > 0; nfds--)
+  for (nfds = src->nsds; nfds >= 0; nfds--)
     if (FD_ISSET (nfds, &src->sds))
 
     {
@@ -1310,6 +1310,7 @@
 
 /**
  * Check if sockets or pipes meet certain conditions
+ *
  * @param rfds set of sockets or pipes to be checked for readability
  * @param wfds set of sockets or pipes to be checked for writability
  * @param efds set of sockets or pipes to be checked for exceptions
@@ -1423,8 +1424,7 @@
   {
     GNUNET_break (0);
     LOG (GNUNET_ERROR_TYPE_ERROR,
-         _
-         ("Fatal internal logic error, process hangs in `%s' (abort with 
CTRL-C)!\n"),
+         _("Fatal internal logic error, process hangs in `%s' (abort with 
CTRL-C)!\n"),
          "select");
   }
 #ifndef MINGW




reply via email to

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