gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r9125 - gnunet/src/util
Date: Mon, 5 Oct 2009 06:56:47 -0600

Author: grothoff
Date: 2009-10-05 06:56:47 -0600 (Mon, 05 Oct 2009)
New Revision: 9125

Modified:
   gnunet/src/util/disk.c
   gnunet/src/util/disk.h
   gnunet/src/util/network.c
Log:
fix

Modified: gnunet/src/util/disk.c
===================================================================
--- gnunet/src/util/disk.c      2009-10-05 12:51:05 UTC (rev 9124)
+++ gnunet/src/util/disk.c      2009-10-05 12:56:47 UTC (rev 9125)
@@ -1747,8 +1747,9 @@
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
 int
-GNUNET_internal_disk_file_handle (const struct GNUNET_DISK_FileHandle *fh,
-    void *dst, unsigned int dst_len)
+GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle *fh,
+                                  void *dst, 
+                                  size_t dst_len)
 {
 #ifdef MINGW
   if (dst_len < sizeof (HANDLE))

Modified: gnunet/src/util/disk.h
===================================================================
--- gnunet/src/util/disk.h      2009-10-05 12:51:05 UTC (rev 9124)
+++ gnunet/src/util/disk.h      2009-10-05 12:56:47 UTC (rev 9125)
@@ -30,15 +30,27 @@
 
 #include "gnunet_disk_lib.h"
 
+
+/**
+ * Handle used to access files (and pipes).  
+ */
 struct GNUNET_DISK_FileHandle
 {
 #ifdef MINGW
+  /**
+   * File handle under W32.
+   */
   HANDLE h;
 #else
+  /**
+   * File handle on other OSes.
+   */
   int fd;
 #endif
 };
 
+
+
 /**
  * Retrieve OS file handle
  *
@@ -48,7 +60,8 @@
  * @param dst_len length of dst
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_internal_disk_file_handle (const struct GNUNET_DISK_FileHandle *fh,
-                                      void *dst, unsigned int dst_len);
+int GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle *fh,
+                                      void *dst,
+                                     size_t dst_len);
 
 #endif /* GNUNET_DISK_H_ */

Modified: gnunet/src/util/network.c
===================================================================
--- gnunet/src/util/network.c   2009-10-05 12:51:05 UTC (rev 9124)
+++ gnunet/src/util/network.c   2009-10-05 12:56:47 UTC (rev 9125)
@@ -527,12 +527,12 @@
 #ifdef MINGW
   HANDLE hw;
 
-  GNUNET_internal_disk_file_handle (h, &hw, sizeof (HANDLE));
+  GNUNET_DISK_internal_file_handle_ (h, &hw, sizeof (HANDLE));
   GNUNET_CONTAINER_slist_add (fds->handles, GNUNET_NO, &hw, sizeof (HANDLE));
 #else
   int fd;
 
-  GNUNET_internal_disk_file_handle (h, &fd, sizeof (int));
+  GNUNET_DISK_internal_file_handle_ (h, &fd, sizeof (int));
   FD_SET (fd, &fds->sds);
   if (fd + 1 > fds->nsds)
     fds->nsds = fd + 1;





reply via email to

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