gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r10639 - gnunet/src/fs
Date: Thu, 18 Mar 2010 10:44:44 +0100

Author: grothoff
Date: 2010-03-18 10:44:44 +0100 (Thu, 18 Mar 2010)
New Revision: 10639

Modified:
   gnunet/src/fs/gnunet-service-fs.c
Log:
fixes

Modified: gnunet/src/fs/gnunet-service-fs.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs.c   2010-03-18 09:31:00 UTC (rev 10638)
+++ gnunet/src/fs/gnunet-service-fs.c   2010-03-18 09:44:44 UTC (rev 10639)
@@ -2376,6 +2376,7 @@
   type = ntohl (gm->type);
   switch (type)
     {
+    case GNUNET_DATASTORE_BLOCKTYPE_ANY:
     case GNUNET_DATASTORE_BLOCKTYPE_DBLOCK:
     case GNUNET_DATASTORE_BLOCKTYPE_IBLOCK:
     case GNUNET_DATASTORE_BLOCKTYPE_KBLOCK:
@@ -2402,7 +2403,7 @@
   bfsize = msize - sizeof (struct GetMessage) + bits * sizeof 
(GNUNET_HashCode);
   bm = ntohl (gm->hash_bitmap);
   if ( (0 != (bm & GET_MESSAGE_BIT_SKS_NAMESPACE)) &&
-       (ntohl (gm->type) == GNUNET_DATASTORE_BLOCKTYPE_SBLOCK) )
+       (type != GNUNET_DATASTORE_BLOCKTYPE_SBLOCK) )
     {
       GNUNET_break_op (0);
       return GNUNET_SYSERR;      
@@ -2457,7 +2458,7 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Received request for `%s' of type %u from peer `%4s'\n",
              GNUNET_h2s (&gm->query),
-             (unsigned int) ntohl (gm->type),
+             (unsigned int) type,
              GNUNET_i2s (other));
 #endif
   have_ns = (0 != (bm & GET_MESSAGE_BIT_SKS_NAMESPACE));
@@ -2467,16 +2468,8 @@
     pr->namespace = (GNUNET_HashCode*) &pr[1];
   pr->type = type;
   pr->mingle = ntohl (gm->filter_mutator);
-  if (0 != (bm & GET_MESSAGE_BIT_SKS_NAMESPACE))
-    {
-      memcpy (&pr[1], &opt[bits++], sizeof (GNUNET_HashCode));
-    }
-  else if (pr->type == GNUNET_DATASTORE_BLOCKTYPE_SBLOCK)
-    {
-      GNUNET_break_op (0);
-      GNUNET_free (pr);
-      return GNUNET_SYSERR;
-    }
+  if (0 != (bm & GET_MESSAGE_BIT_SKS_NAMESPACE))    
+    memcpy (&pr[1], &opt[bits++], sizeof (GNUNET_HashCode));
   if (0 != (bm & GET_MESSAGE_BIT_TRANSMIT_TO))
     pr->target_pid = GNUNET_PEER_intern ((const struct GNUNET_PeerIdentity*) 
&opt[bits++]);
 





reply via email to

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