if (record->client != client)
return GNUNET_YES;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Removing client %p's record for key %s\n",
+ client,
+ GNUNET_h2s (key));
GNUNET_assert (GNUNET_YES ==
GNUNET_CONTAINER_multihashmap_remove (forward_map,
key, record));
struct ClientList *pos;
struct PendingMessage *reply;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Local client %p disconnects\n",
+ client);
pos = find_active_client (client);
GNUNET_CONTAINER_DLL_remove (client_head,
client_tail,
gettext_noop ("# GET requests received from clients"), 1,
GNUNET_NO);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Received request for %s from local client\n",
- GNUNET_h2s (&get->key));
+ "Received request for %s from local client %p\n",
+ GNUNET_h2s (&get->key),
+ client);
cqr = GNUNET_malloc (sizeof (struct ClientQueryRecord) + xquery_size);
cqr->key = get->key;
cqr->client = find_active_client (client);
if (record->unique_id != ctx->unique_id)
return GNUNET_YES;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Removing client %p's record for key %s (by unique id)\n",
+ ctx->client,
+ GNUNET_h2s (key));
return remove_client_records (ctx->client, key, record);
}
GNUNET_STATISTICS_update (GDS_stats,
gettext_noop ("# GET STOP requests received from clients"), 1,
GNUNET_NO);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Client %p stopped request for key %s\n",
+ client,
+ GNUNET_h2s (&dht_stop_msg->key));
ctx.client = find_active_client (client);
ctx.unique_id = dht_stop_msg->unique_id;
GNUNET_CONTAINER_multihashmap_get_multiple (forward_map,
if ( (record->type != GNUNET_BLOCK_TYPE_ANY) &&
(record->type != frc->type) )
{
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Record type missmatch, not passing request for key %s to local client\n",
+ GNUNET_h2s (key));
GNUNET_STATISTICS_update (GDS_stats,
gettext_noop ("# Key match, type mismatches in REPLY to CLIENT"), 1,
GNUNET_NO);
&ch,
sizeof (GNUNET_HashCode)))
{
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Duplicate reply, not passing request for key %s to local client\n",
+ GNUNET_h2s (key));
GNUNET_STATISTICS_update (GDS_stats,
gettext_noop ("# Duplicate REPLIES to CLIENT request dropped"), 1,
GNUNET_NO);
record->xquery_size,
frc->data,
frc->data_size);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Evaluation result is %d for key %s for local client's query\n",
+ (int) eval,
+ GNUNET_h2s (key));
switch (eval)
{
case GNUNET_BLOCK_EVALUATION_OK_LAST:
GNUNET_NO);
reply = (struct GNUNET_DHT_ClientResultMessage*) &pm[1];
reply->unique_id = record->unique_id;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Queueing reply to query %s for peer %p\n",
+ GNUNET_h2s (key),
+ record->client->client_handle);
add_pending_message (record->client, pm);
if (GNUNET_YES == do_free)
remove_client_records (record->client, key, record);