gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r5831 - in GNUnet/src/applications: datastore fs/lib fs/mod


From: gnunet
Subject: [GNUnet-SVN] r5831 - in GNUnet/src/applications: datastore fs/lib fs/module
Date: Sun, 9 Dec 2007 14:23:11 -0700 (MST)

Author: grothoff
Date: 2007-12-09 14:23:10 -0700 (Sun, 09 Dec 2007)
New Revision: 5831

Modified:
   GNUnet/src/applications/datastore/datastore.c
   GNUnet/src/applications/fs/lib/check.conf
   GNUnet/src/applications/fs/lib/peer.conf
   GNUnet/src/applications/fs/module/fs.c
Log:
fix

Modified: GNUnet/src/applications/datastore/datastore.c
===================================================================
--- GNUnet/src/applications/datastore/datastore.c       2007-12-09 21:00:43 UTC 
(rev 5830)
+++ GNUnet/src/applications/datastore/datastore.c       2007-12-09 21:23:10 UTC 
(rev 5831)
@@ -157,6 +157,7 @@
 del (const GNUNET_HashCode * query, const GNUNET_DatastoreValue * value)
 {
   int ok;
+  int ret;
   GNUNET_EncName enc;
 
   if (!testAvailable (query))
@@ -168,15 +169,28 @@
                      GNUNET_GE_WARNING | GNUNET_GE_BULK | GNUNET_GE_USER,
                      _("Availability test failed for `%s' at %s:%d.\n"), &enc,
                      __FILE__, __LINE__);
-      return 0;
+      return GNUNET_NO;
     }
   ok = sq->get (query, ntohl (value->type), &deleteCB, (void *) value);
+  if (ok == GNUNET_SYSERR)
+    return GNUNET_SYSERR;
+  if (ok == 0) {
+    IF_GELOG (coreAPI->ectx,
+             GNUNET_GE_WARNING | GNUNET_GE_BULK | GNUNET_GE_USER,
+             GNUNET_hash_to_enc (query, &enc));
+    GNUNET_GE_LOG (coreAPI->ectx,
+                  GNUNET_GE_WARNING | GNUNET_GE_BULK | GNUNET_GE_USER,
+                  _("Availability test failed for `%s' at %s:%d.\n"), &enc,
+                  __FILE__, __LINE__);
+    return GNUNET_NO;
+  }
+  ret = ok;
   while (ok-- > 0)
     {
-      makeUnavailable (query);  /* update filter! */
+      makeUnavailable (query);  /* update bloom filter! */
       available += ntohl (value->size);
     }
-  return ok;
+  return ret;
 }
 
 /**

Modified: GNUnet/src/applications/fs/lib/check.conf
===================================================================
--- GNUnet/src/applications/fs/lib/check.conf   2007-12-09 21:00:43 UTC (rev 
5830)
+++ GNUnet/src/applications/fs/lib/check.conf   2007-12-09 21:23:10 UTC (rev 
5831)
@@ -1,6 +1,6 @@
 # General settings
 [PATHS]
-GNUNET_HOME = "/tmp/gnunet-session-test-driver"
+GNUNET_HOME = "/tmp/gnunet-fslib-test-driver"
 
 [GNUNET]
 LOGLEVEL = "WARNING"

Modified: GNUnet/src/applications/fs/lib/peer.conf
===================================================================
--- GNUnet/src/applications/fs/lib/peer.conf    2007-12-09 21:00:43 UTC (rev 
5830)
+++ GNUnet/src/applications/fs/lib/peer.conf    2007-12-09 21:23:10 UTC (rev 
5831)
@@ -15,7 +15,7 @@
 PIDFILE         = $HOME/gnunetd.pid
 HOSTS          = $HOME/data/hosts/
 APPLICATIONS = "fs stats"
-# TRANSPORTS = -- no transports!
+TRANSPORTS = ""
 
 [MODULES]
 sqstore = "sqstore_sqlite"

Modified: GNUnet/src/applications/fs/module/fs.c
===================================================================
--- GNUnet/src/applications/fs/module/fs.c      2007-12-09 21:00:43 UTC (rev 
5830)
+++ GNUnet/src/applications/fs/module/fs.c      2007-12-09 21:23:10 UTC (rev 
5831)
@@ -616,10 +616,14 @@
                  type);
 #endif
   GNUNET_mutex_lock (lock);
-  if (GNUNET_SYSERR == datastore->get (&query, type, &completeValue, value))   
 /* aborted == found! */
-    ret = datastore->del (&query, value);
-  else                          /* not found */
-    ret = GNUNET_SYSERR;
+  if (GNUNET_SYSERR == datastore->get (&query, type, &completeValue, value)) 
+    {    /* aborted == found! */ 
+      ret = datastore->del (&query, value);
+    }
+  else 
+    {                         /* not found */
+      ret = GNUNET_SYSERR;
+    }
   GNUNET_mutex_unlock (lock);
   GNUNET_free (value);
 #if DEBUG_FS





reply via email to

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