gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r2512 - GNUnet/src/applications/datastore


From: grothoff
Subject: [GNUnet-SVN] r2512 - GNUnet/src/applications/datastore
Date: Tue, 14 Mar 2006 23:14:49 -0800 (PST)

Author: grothoff
Date: 2006-03-14 23:14:40 -0800 (Tue, 14 Mar 2006)
New Revision: 2512

Modified:
   GNUnet/src/applications/datastore/prefetch.c
Log:
fix

Modified: GNUnet/src/applications/datastore/prefetch.c
===================================================================
--- GNUnet/src/applications/datastore/prefetch.c        2006-03-15 06:44:35 UTC 
(rev 2511)
+++ GNUnet/src/applications/datastore/prefetch.c        2006-03-15 07:14:40 UTC 
(rev 2512)
@@ -148,7 +148,10 @@
   minDist = -1; /* max */
   MUTEX_LOCK(&lock);
   for (i=0;i<rCBPos;i++) {
-    if ( (type != ntohl(randomContentBuffer[i].value->type)) ||
+    if (randomContentBuffer[i].value == NULL)
+      continue;
+    if ( ( ( (type != ntohl(randomContentBuffer[i].value->type)) &&
+            (type != 0) ) ) ||
         (sizeLimit < ntohl(randomContentBuffer[i].value->size)) )
       continue;
     dist = distanceHashCode512(&randomContentBuffer[i].key,
@@ -175,7 +178,7 @@
                                
 void initPrefetch(SQstore_ServiceAPI * s) {
   sq = s;
-  memset(&randomContentBuffer,
+  memset(randomContentBuffer,
         0,
         sizeof(ContentBuffer *)*RCB_SIZE);
   acquireMoreSignal = SEMAPHORE_NEW(RCB_SIZE);





reply via email to

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