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;
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:
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)
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++;
}
}