-make use of new IRRELEVANT status code
authorChristian Grothoff <christian@grothoff.org>
Thu, 15 Nov 2012 12:46:25 +0000 (12:46 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 15 Nov 2012 12:46:25 +0000 (12:46 +0000)
src/fs/gnunet-service-fs_pr.c
src/fs/plugin_block_fs.c

index f65ed66a6c2198760f9d1968346c174fae911673..349232dafb7ae58873175d70b52a4bee5caa7ad8 100644 (file)
@@ -842,6 +842,14 @@ process_reply (void *cls, const struct GNUNET_HashCode * key, void *value)
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Duplicate response, discarding.\n");
     return GNUNET_YES;          /* duplicate */
+  case GNUNET_BLOCK_EVALUATION_RESULT_IRRELEVANT:
+    GNUNET_STATISTICS_update (GSF_stats,
+                              gettext_noop
+                              ("# irrelevant replies discarded"),
+                              1, GNUNET_NO);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Irrelevant response, ignoring.\n");
+    return GNUNET_YES;
   case GNUNET_BLOCK_EVALUATION_RESULT_INVALID:
     return GNUNET_YES;          /* wrong namespace */
   case GNUNET_BLOCK_EVALUATION_REQUEST_VALID:
index 2e4f7ef873047ef32d2a6fad5001dbb9fe8abe8e..8e90589cf3bd6d6b82464a8c0aed2113c86f59b2 100644 (file)
@@ -124,12 +124,7 @@ block_plugin_fs_evaluate (void *cls, enum GNUNET_BLOCK_Type type,
                         sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
                         &sh);
     if (0 != memcmp (nsid, &sh, sizeof (struct GNUNET_HashCode)))
-    {
-      GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, "block-fs",
-                       _
-                       ("Reply mismatched in terms of namespace.  Discarded.\n"));
-      return GNUNET_BLOCK_EVALUATION_RESULT_INVALID;
-    }
+      return GNUNET_BLOCK_EVALUATION_RESULT_IRRELEVANT;
     if (NULL != bf)
     {
       GNUNET_CRYPTO_hash (reply_block, reply_block_size, &chash);