gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r2609 - GNUnet/src/applications/fs/module


From: durner
Subject: [GNUnet-SVN] r2609 - GNUnet/src/applications/fs/module
Date: Mon, 3 Apr 2006 22:04:11 -0700 (PDT)

Author: durner
Date: 2006-04-03 22:04:05 -0700 (Mon, 03 Apr 2006)
New Revision: 2609

Modified:
   GNUnet/src/applications/fs/module/migration.c
   GNUnet/src/applications/fs/module/ondemand.h
Log:
Fix migration of ONDEMAND data (Mantis #0001025)

Modified: GNUnet/src/applications/fs/module/migration.c
===================================================================
--- GNUnet/src/applications/fs/module/migration.c       2006-04-02 12:04:22 UTC 
(rev 2608)
+++ GNUnet/src/applications/fs/module/migration.c       2006-04-04 05:04:05 UTC 
(rev 2609)
@@ -30,6 +30,8 @@
 #include "fs.h"
 #include "anonymity.h"
 #include "gnunet_stats_service.h"
+#include "gnunet_protocols.h"
+#include "ondemand.h"
 
 #define DEBUG_MIGRATION NO
 
@@ -125,6 +127,18 @@
       return 0;
     }
   }
+  
+  if (ntohl(content->type) == ONDEMAND_BLOCK) {
+    Datastore_Value *enc;
+    
+    if (ONDEMAND_getIndexed(datastore, content, &key, &enc) != OK) {
+      MUTEX_UNLOCK(&lock);
+      return 0;
+    }
+      
+    content = enc;
+  }
+  
   size = sizeof(GapWrapper) + ntohl(content->size) - sizeof(Datastore_Value);
   if (size > padding) {
     MUTEX_UNLOCK(&lock);

Modified: GNUnet/src/applications/fs/module/ondemand.h
===================================================================
--- GNUnet/src/applications/fs/module/ondemand.h        2006-04-02 12:04:22 UTC 
(rev 2608)
+++ GNUnet/src/applications/fs/module/ondemand.h        2006-04-04 05:04:05 UTC 
(rev 2609)
@@ -29,6 +29,7 @@
 
 #include "gnunet_util.h"
 #include "gnunet_datastore_service.h"
+#include "ecrs_core.h"
 
 #define EXTRA_CHECKS YES
 





reply via email to

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