gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r9219 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r9219 - gnunet/src/fs
Date: Tue, 20 Oct 2009 02:18:33 -0600

Author: grothoff
Date: 2009-10-20 02:18:33 -0600 (Tue, 20 Oct 2009)
New Revision: 9219

Modified:
   gnunet/src/fs/Makefile.am
   gnunet/src/fs/fs_download.c
   gnunet/src/fs/fs_file_information.c
   gnunet/src/fs/fs_publish.c
   gnunet/src/fs/fs_tree.c
   gnunet/src/fs/gnunet-service-fs.c
   gnunet/src/fs/test_fs_directory.c
   gnunet/src/fs/test_fs_download.c
   gnunet/src/fs/test_fs_download_data.conf
Log:
final fixes, adding testcase to official suite

Modified: gnunet/src/fs/Makefile.am
===================================================================
--- gnunet/src/fs/Makefile.am   2009-10-20 08:13:16 UTC (rev 9218)
+++ gnunet/src/fs/Makefile.am   2009-10-20 08:18:33 UTC (rev 9219)
@@ -108,7 +108,7 @@
  test_fs_getopt \
  test_fs_uri
 
-TESTS = test_fs_directory test_fs_uri
+TESTS = test_fs_directory test_fs_download test_fs_uri
 
 # $(check_PROGRAMS)
 

Modified: gnunet/src/fs/fs_download.c
===================================================================
--- gnunet/src/fs/fs_download.c 2009-10-20 08:13:16 UTC (rev 9218)
+++ gnunet/src/fs/fs_download.c 2009-10-20 08:18:33 UTC (rev 9219)
@@ -36,7 +36,7 @@
 #include "fs.h"
 #include "fs_tree.h"
 
-#define DEBUG_DOWNLOAD GNUNET_YES
+#define DEBUG_DOWNLOAD GNUNET_NO
 
 /**
  * We're storing the IBLOCKS after the
@@ -339,12 +339,7 @@
                                          &query);
   if (NULL == sm)
     {
-      GNUNET_break (0); /* FIXME: this assertion actually fails for one
-                          of my tests, the ascii-strings of the
-                          query match what was printed when the
-                          request was originally made; this does
-                          NOT happen if in line ~825 a HT size
-                          of 1 is used! => bug in HT? */
+      GNUNET_break (0);
       return;
     }
   if (size != calculate_block_size (GNUNET_ntohll 
(dc->uri->data.chk.file_length),
@@ -442,6 +437,7 @@
            }
          GNUNET_CLIENT_disconnect (dc->client);
          dc->client = NULL;
+         GNUNET_free (sm);
          return;
        }
     }
@@ -501,7 +497,10 @@
     }
   // FIXME: make persistent
   if (sm->depth == dc->treedepth) 
-    return;
+    {
+      GNUNET_free (sm);      
+      return;
+    }
 #if DEBUG_DOWNLOAD
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Triggering downloads of children (this block was at level %u and 
offset %llu)\n",
@@ -523,6 +522,7 @@
                                 off,
                                 sm->depth + 1);
     }
+  GNUNET_free (sm);
 }
 
 

Modified: gnunet/src/fs/fs_file_information.c
===================================================================
--- gnunet/src/fs/fs_file_information.c 2009-10-20 08:13:16 UTC (rev 9218)
+++ gnunet/src/fs/fs_file_information.c 2009-10-20 08:18:33 UTC (rev 9219)
@@ -835,6 +835,7 @@
                 &fi->client_info);
     }
   GNUNET_free_non_null (fi->emsg);
+  GNUNET_free_non_null (fi->chk_uri);
   /* clean up serialization */
   if ( (NULL != fi->serialization) &&
        (0 != UNLINK (fi->serialization)) )

Modified: gnunet/src/fs/fs_publish.c
===================================================================
--- gnunet/src/fs/fs_publish.c  2009-10-20 08:13:16 UTC (rev 9218)
+++ gnunet/src/fs/fs_publish.c  2009-10-20 08:18:33 UTC (rev 9219)
@@ -40,7 +40,7 @@
 #include "fs.h"
 #include "fs_tree.h"
 
-#define DEBUG_PUBLISH GNUNET_YES
+#define DEBUG_PUBLISH GNUNET_NO
 
 /**
  * Maximum allowed size for a KBlock.

Modified: gnunet/src/fs/fs_tree.c
===================================================================
--- gnunet/src/fs/fs_tree.c     2009-10-20 08:13:16 UTC (rev 9218)
+++ gnunet/src/fs/fs_tree.c     2009-10-20 08:18:33 UTC (rev 9219)
@@ -31,7 +31,7 @@
 #include "platform.h"
 #include "fs_tree.h"
 
-#define DEBUG_TREE GNUNET_YES
+#define DEBUG_TREE GNUNET_NO
 
 /**
  * Context for an ECRS-based file encoder that computes

Modified: gnunet/src/fs/gnunet-service-fs.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs.c   2009-10-20 08:13:16 UTC (rev 9218)
+++ gnunet/src/fs/gnunet-service-fs.c   2009-10-20 08:18:33 UTC (rev 9219)
@@ -47,7 +47,7 @@
 #include "gnunet_util_lib.h"
 #include "fs.h"
 
-#define DEBUG_FS GNUNET_YES
+#define DEBUG_FS GNUNET_NO
 
 
 /**
@@ -875,6 +875,12 @@
                  "FS");
       return;
     }
+  if (GNUNET_NO == GNUNET_DISK_file_test (fn))
+    {
+      /* no index info  yet */
+      GNUNET_free (fn);
+      return;
+    }
   rh = GNUNET_BIO_read_open (fn);
   if (NULL == rh)
     {

Modified: gnunet/src/fs/test_fs_directory.c
===================================================================
--- gnunet/src/fs/test_fs_directory.c   2009-10-20 08:13:16 UTC (rev 9218)
+++ gnunet/src/fs/test_fs_directory.c   2009-10-20 08:18:33 UTC (rev 9219)
@@ -134,7 +134,7 @@
           (unsigned long long) dlen,
           s);
   GNUNET_free (s);
-  if (i < 1000)
+  if (i < 100)
     {
       cls.pos = 0;
       cls.uri = uris;
@@ -169,10 +169,8 @@
                    "WARNING",
 #endif
                    NULL);
-  for (i = 17; i < 4000; i *= 2)
+  for (i = 17; i < 1000; i *= 2)
     failureCount += testDirectory (i);    
-  fprintf (stderr, "\n");
-
   if (failureCount != 0)
     return 1;
   return 0;

Modified: gnunet/src/fs/test_fs_download.c
===================================================================
--- gnunet/src/fs/test_fs_download.c    2009-10-20 08:13:16 UTC (rev 9218)
+++ gnunet/src/fs/test_fs_download.c    2009-10-20 08:18:33 UTC (rev 9219)
@@ -29,7 +29,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_fs_service.h"
 
-#define VERBOSE GNUNET_YES
+#define VERBOSE GNUNET_NO
 
 #define START_ARM GNUNET_YES
 

Modified: gnunet/src/fs/test_fs_download_data.conf
===================================================================
--- gnunet/src/fs/test_fs_download_data.conf    2009-10-20 08:13:16 UTC (rev 
9218)
+++ gnunet/src/fs/test_fs_download_data.conf    2009-10-20 08:18:33 UTC (rev 
9219)
@@ -19,7 +19,7 @@
 DEFAULTSERVICES = resolver datastore transport core fs
 
 [datastore]
-DEBUG = YES
+#DEBUG = YES
 
 [statistics]
 PORT = 42467
@@ -36,7 +36,7 @@
 [fs]
 PORT = 42471
 HOSTNAME = localhost
-DEBUG = YES
+#DEBUG = YES
 
 [testing]
 WEAKRANDOM = YES





reply via email to

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