/*
This file is part of GNUnet.
- (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
/**
- * Entry in the DHT routing table for a client's GET request.
+ * Entry in the local forwarding map for a client's GET request.
*/
struct ClientQueryRecord
{
static struct ClientMonitorRecord *monitor_tail;
/**
- * Hashmap for fast key based lookup, maps keys to 'struct ClientQueryRecord' entries.
+ * Hashmap for fast key based lookup, maps keys to `struct ClientQueryRecord` entries.
*/
static struct GNUNET_CONTAINER_MultiHashMap *forward_map;
/**
* Task that re-transmits requests (using retry_heap).
*/
-static GNUNET_SCHEDULER_TaskIdentifier retry_task;
+static struct GNUNET_SCHEDULER_Task * retry_task;
/**
GNUNET_CONSTANTS_BLOOMFILTER_K);
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Initiating GET for %s, replication %u, already have %u replies\n",
- GNUNET_h2s(&cqr->key), cqr->replication, cqr->seen_replies_count);
+ GNUNET_h2s (&cqr->key),
+ cqr->replication,
+ cqr->seen_replies_count);
GDS_NEIGHBOURS_handle_get (cqr->type, cqr->msg_options, cqr->replication,
0 /* hop count */ ,
&cqr->key, cqr->xquery, cqr->xquery_size, reply_bf,
struct ClientQueryRecord *cqr;
struct GNUNET_TIME_Relative delay;
- retry_task = GNUNET_SCHEDULER_NO_TASK;
+ retry_task = NULL;
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
return;
while (NULL != (cqr = GNUNET_CONTAINER_heap_remove_root (retry_heap)))
("# PUT requests received from clients"), 1,
GNUNET_NO);
dht_msg = (const struct GNUNET_DHT_ClientPutMessage *) message;
- LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG, "XDHT CLIENT-PUT %s @ %u\n",
- GNUNET_h2s (&dht_msg->key), getpid ());
+ LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG, "R5N CLIENT-PUT %s\n",
+ GNUNET_h2s_full (&dht_msg->key));
/* give to local clients */
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Handling local PUT of %u-bytes for query %s\n",
"Received GET request for %s from local client %p, xq: %.*s\n",
GNUNET_h2s (&get->key), client, xquery_size, xquery);
- LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG, "XDHT CLIENT-GET %s @ %u\n",
- GNUNET_h2s (&get->key), getpid ());
+ LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG, "R5N CLIENT-GET %s\n",
+ GNUNET_h2s_full (&get->key));
cqr = GNUNET_malloc (sizeof (struct ClientQueryRecord) + xquery_size);
GDS_NEIGHBOURS_get_id(),
&get->key);
/* start remote requests */
- if (GNUNET_SCHEDULER_NO_TASK != retry_task)
+ if (NULL != retry_task)
GNUNET_SCHEDULER_cancel (retry_task);
retry_task = GNUNET_SCHEDULER_add_now (&transmit_next_request_task, NULL);
/* perform local lookup */
GNUNET_SERVER_receive_done (client, GNUNET_OK);
}
+
/**
* Handler for monitor stop messages
*
int do_free;
struct GNUNET_HashCode ch;
unsigned int i;
-
+
LOG_TRAFFIC (GNUNET_ERROR_TYPE_DEBUG,
- "XDHT CLIENT-RESULT %s\n",
- GNUNET_h2s (key));
+ "R5N CLIENT-RESULT %s\n",
+ GNUNET_h2s_full (key));
if ((record->type != GNUNET_BLOCK_TYPE_ANY) && (record->type != frc->type))
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
return GNUNET_YES; /* duplicate */
}
eval =
- GNUNET_BLOCK_evaluate (GDS_block_context, record->type, key, NULL, 0,
- record->xquery, record->xquery_size, frc->data,
+ GNUNET_BLOCK_evaluate (GDS_block_context,
+ record->type,
+ GNUNET_BLOCK_EO_NONE,
+ key,
+ NULL,
+ 0,
+ record->xquery,
+ record->xquery_size,
+ frc->data,
frc->data_size);
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Evaluation result is %d for key %s for local client's query\n",
- (int) eval, GNUNET_h2s (key));
+ (int) eval,
+ GNUNET_h2s (key));
switch (eval)
{
case GNUNET_BLOCK_EVALUATION_OK_LAST:
{
GNUNET_assert (client_head == NULL);
GNUNET_assert (client_tail == NULL);
- if (GNUNET_SCHEDULER_NO_TASK != retry_task)
+ if (NULL != retry_task)
{
GNUNET_SCHEDULER_cancel (retry_task);
- retry_task = GNUNET_SCHEDULER_NO_TASK;
+ retry_task = NULL;
}
if (NULL != retry_heap)
{