Refactoring gnunet time
[oweals/gnunet.git] / src / fs / fs_search.c
index 2c7d34b08a2cea32e39950de217997137c1a9c2b..16e1dd1d58c4b2153d890c162889f72b3aea6da6 100644 (file)
@@ -4,7 +4,7 @@
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
-     by the Free Software Foundation; either version 2, or (at your
+     by the Free Software Foundation; either version 3, or (at your
      option) any later version.
 
      GNUnet is distributed in the hope that it will be useful, but
@@ -806,7 +806,7 @@ process_result (struct GNUNET_FS_SearchContext *sc,
                const void *data,
                size_t size)
 {
-  if (GNUNET_TIME_absolute_get_duration (expiration).value > 0)
+  if (GNUNET_TIME_absolute_get_duration (expiration).rel_value > 0)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Result received has already expired.\n");
@@ -814,7 +814,7 @@ process_result (struct GNUNET_FS_SearchContext *sc,
     }
   switch (type)
     {
-    case GNUNET_BLOCK_TYPE_KBLOCK:
+    case GNUNET_BLOCK_TYPE_FS_KBLOCK:
       if (! GNUNET_FS_uri_test_ksk (sc->uri))
        {
          GNUNET_break (0);
@@ -827,7 +827,7 @@ process_result (struct GNUNET_FS_SearchContext *sc,
        }
       process_kblock (sc, data, size);
       break;
-    case GNUNET_BLOCK_TYPE_SBLOCK:
+    case GNUNET_BLOCK_TYPE_FS_SBLOCK:
       if (! GNUNET_FS_uri_test_sks (sc->uri))
        {
          GNUNET_break (0);
@@ -840,7 +840,7 @@ process_result (struct GNUNET_FS_SearchContext *sc,
        }
       process_sblock (sc, data, size);
       break;
-    case GNUNET_BLOCK_TYPE_NBLOCK:
+    case GNUNET_BLOCK_TYPE_FS_NBLOCK:
       if (! GNUNET_FS_uri_test_ksk (sc->uri))
        {
          GNUNET_break (0);
@@ -854,9 +854,9 @@ process_result (struct GNUNET_FS_SearchContext *sc,
       process_nblock (sc, data, size);
       break;
     case GNUNET_BLOCK_TYPE_ANY:
-    case GNUNET_BLOCK_TYPE_DBLOCK:
-    case GNUNET_BLOCK_TYPE_ONDEMAND:
-    case GNUNET_BLOCK_TYPE_IBLOCK:
+    case GNUNET_BLOCK_TYPE_FS_DBLOCK:
+    case GNUNET_BLOCK_TYPE_FS_ONDEMAND:
+    case GNUNET_BLOCK_TYPE_FS_IBLOCK:
       GNUNET_break (0);
       break;
     default:
@@ -981,7 +981,7 @@ transmit_search_request (void *cls,
        sm->options = htonl (1);
       else
        sm->options = htonl (0);      
-      sm->type = htonl (GNUNET_BLOCK_TYPE_SBLOCK);
+      sm->type = htonl (GNUNET_BLOCK_TYPE_FS_SBLOCK);
       sm->anonymity_level = htonl (sc->anonymity);
       sm->target = sc->uri->data.sks.namespace;
       identifier = sc->uri->data.sks.identifier;