- update default values, eliminate obsolete ones
[oweals/gnunet.git] / src / dht / gnunet-service-xdht_datacache.c
index b679f28a6e72d401927bdf561ecf881c5db13792..6d13e344dc6a49365ca81f00c147ae2e640ea2c9 100644 (file)
@@ -188,9 +188,9 @@ static int
 datacache_get_iterator (void *cls,
                         const struct GNUNET_HashCode * key, size_t size,
                         const char *data, enum GNUNET_BLOCK_Type type,
-                       struct GNUNET_TIME_Absolute exp,
-                       unsigned int put_path_length,
-                       const struct GNUNET_PeerIdentity *put_path)
+                                         struct GNUNET_TIME_Absolute exp,
+                                         unsigned int put_path_length,
+                                         const struct GNUNET_PeerIdentity *put_path)
 {
   struct GetRequestContext *ctx = cls;
   enum GNUNET_BLOCK_EvaluationResult eval;
@@ -223,10 +223,9 @@ datacache_get_iterator (void *cls,
       i++;
       iterator = iterator->next;
     }
-    GDS_NEIGHBOURS_send_get_result (exp, key, put_path_length, put_path,
-                                    type, size, data, get_path, ctx->get_path_length,
-                                    &(ctx->next_hop),
-                                    &(ctx->source_peer));
+    GDS_NEIGHBOURS_send_get_result (key,type, &(ctx->next_hop),&(ctx->source_peer),
+                                    put_path_length, put_path, ctx->get_path_length,
+                                    get_path, exp, data, size );
     
     break;
   case GNUNET_BLOCK_EVALUATION_OK_DUPLICATE:
@@ -308,8 +307,8 @@ GDS_DATACACHE_handle_get (const struct GNUNET_HashCode * key,
   if (next_hop != NULL)
     memcpy (&(ctx.next_hop), next_hop, sizeof (struct GNUNET_PeerIdentity));
  
-  /* FIXME: add the get path into ctx and then call gds_neighbours_handle_get*/
   int i = 0;
+
   if(get_path != NULL)
   {
     while (i < get_path_length)
@@ -320,7 +319,7 @@ GDS_DATACACHE_handle_get (const struct GNUNET_HashCode * key,
       element->prev = NULL;
     
       memcpy (&(element->peer), &get_path[i], sizeof(struct GNUNET_PeerIdentity));
-      GNUNET_CONTAINER_DLL_insert_tail(ctx.head, ctx.tail, element);
+      GNUNET_CONTAINER_DLL_insert (ctx.head, ctx.tail, element); 
       i++;
     }
   }