bugfix
[oweals/gnunet.git] / src / util / test_disk.c
index e305889d86f6b371100e75fde1b6bacbf4765785..772ca2889a74c634a92a4cc2806262114f3903bc 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2001, 2002, 2003, 2005, 2006 Christian Grothoff (and other contributing authors)
+     (C) 2001, 2002, 2003, 2005, 2006, 2009 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -85,16 +85,16 @@ testReadWrite ()
 static int
 testOpenClose ()
 {
-  struct GNUNET_IO_Handle *fh;
+  struct GNUNET_DISK_FileHandle *fh;
   unsigned long long size;
   long avail;
 
   fh = GNUNET_DISK_file_open (".testfile", GNUNET_DISK_OPEN_READWRITE
       | GNUNET_DISK_OPEN_CREATE, GNUNET_DISK_PERM_USER_READ
       | GNUNET_DISK_PERM_USER_WRITE);
-  GNUNET_assert (GNUNET_NO == GNUNET_IO_handle_invalid (fh));
+  GNUNET_assert (GNUNET_NO == GNUNET_DISK_handle_invalid (fh));
   GNUNET_break (5 == GNUNET_DISK_file_write (fh, "Hello", 5));
-  GNUNET_DISK_file_close (&fh);
+  GNUNET_DISK_file_close (fh);
   GNUNET_break (GNUNET_OK ==
                 GNUNET_DISK_file_size (".testfile", &size, GNUNET_NO));
   if (size != 5)
@@ -108,16 +108,16 @@ testOpenClose ()
   fh = GNUNET_DISK_file_open (".testfile", GNUNET_DISK_OPEN_READWRITE
       | GNUNET_DISK_OPEN_CREATE, GNUNET_DISK_PERM_USER_WRITE
       | GNUNET_DISK_PERM_USER_READ);
-  GNUNET_assert (GNUNET_NO == GNUNET_IO_handle_invalid (fh));
+  GNUNET_assert (GNUNET_NO == GNUNET_DISK_handle_invalid (fh));
   while ((avail == GNUNET_DISK_get_blocks_available (".testfile")) &&
          (avail != -1))
     if (16 != GNUNET_DISK_file_write (fh, "HelloWorld123456", 16))
       {
-        GNUNET_DISK_file_close (&fh);
+        GNUNET_DISK_file_close (fh);
         GNUNET_break (0 == UNLINK (".testfile"));
         return 1;
       }
-  GNUNET_DISK_file_close (&fh);
+  GNUNET_DISK_file_close (fh);
   GNUNET_break (0 == UNLINK (".testfile"));
 
   return 0;