aboutsummaryrefslogtreecommitdiff
path: root/src/dht
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-25 12:11:06 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-25 12:11:06 +0000
commit94ddc3ef166eebaaeda0799dcc7d6e813d8ce271 (patch)
treed4685f75a716de90370b0134d1b0acba36fb1347 /src/dht
parent21c511cc4c80f0ed3fc60d7552dd5d150f63d5b0 (diff)
downloadgnunet-94ddc3ef166eebaaeda0799dcc7d6e813d8ce271.tar.gz
gnunet-94ddc3ef166eebaaeda0799dcc7d6e813d8ce271.zip
logging
Diffstat (limited to 'src/dht')
-rw-r--r--src/dht/dht_api.c17
-rw-r--r--src/dht/gnunet-service-dht_clients.c2
2 files changed, 15 insertions, 4 deletions
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c
index 7674347e4..e0b97b457 100644
--- a/src/dht/dht_api.c
+++ b/src/dht/dht_api.c
@@ -277,6 +277,9 @@ try_reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
277{ 277{
278 struct GNUNET_DHT_Handle *handle = cls; 278 struct GNUNET_DHT_Handle *handle = cls;
279 279
280 LOG (GNUNET_ERROR_TYPE_DEBUG,
281 "Reconnedting with DHT %p\n",
282 handle);
280 handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK; 283 handle->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
281 if (handle->retry_time.rel_value < GNUNET_CONSTANTS_SERVICE_RETRY.rel_value) 284 if (handle->retry_time.rel_value < GNUNET_CONSTANTS_SERVICE_RETRY.rel_value)
282 handle->retry_time = GNUNET_CONSTANTS_SERVICE_RETRY; 285 handle->retry_time = GNUNET_CONSTANTS_SERVICE_RETRY;
@@ -513,8 +516,9 @@ service_message_handler (void *cls, const struct GNUNET_MessageHeader *msg)
513 } 516 }
514 dht_msg = (const struct GNUNET_DHT_ClientResultMessage *) msg; 517 dht_msg = (const struct GNUNET_DHT_ClientResultMessage *) msg;
515 LOG (GNUNET_ERROR_TYPE_DEBUG, 518 LOG (GNUNET_ERROR_TYPE_DEBUG,
516 "Received reply for `%s' from DHT service\n", 519 "Received reply for `%s' from DHT service %p\n",
517 GNUNET_h2s (&dht_msg->key)); 520 GNUNET_h2s (&dht_msg->key),
521 handle);
518 GNUNET_CONTAINER_multihashmap_get_multiple (handle->active_requests, 522 GNUNET_CONTAINER_multihashmap_get_multiple (handle->active_requests,
519 &dht_msg->key, &process_reply, 523 &dht_msg->key, &process_reply,
520 (void *) dht_msg); 524 (void *) dht_msg);
@@ -716,6 +720,10 @@ GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle,
716 GNUNET_break (0); 720 GNUNET_break (0);
717 return NULL; 721 return NULL;
718 } 722 }
723 LOG (GNUNET_ERROR_TYPE_DEBUG,
724 "Sending query for %s to DHT %p\n",
725 GNUNET_h2s (key),
726 handle);
719 pending = GNUNET_malloc (sizeof (struct PendingMessage) + msize); 727 pending = GNUNET_malloc (sizeof (struct PendingMessage) + msize);
720 get_msg = (struct GNUNET_DHT_ClientGetMessage *) &pending[1]; 728 get_msg = (struct GNUNET_DHT_ClientGetMessage *) &pending[1];
721 pending->msg = &get_msg->header; 729 pending->msg = &get_msg->header;
@@ -761,7 +769,10 @@ GNUNET_DHT_get_stop (struct GNUNET_DHT_GetHandle *get_handle)
761 handle = get_handle->message->handle; 769 handle = get_handle->message->handle;
762 get_msg = 770 get_msg =
763 (const struct GNUNET_DHT_ClientGetMessage *) get_handle->message->msg; 771 (const struct GNUNET_DHT_ClientGetMessage *) get_handle->message->msg;
764 772 LOG (GNUNET_ERROR_TYPE_DEBUG,
773 "Sending STOP for %s to DHT via %p\n",
774 GNUNET_h2s (&get_msg->key),
775 handle);
765 /* generate STOP */ 776 /* generate STOP */
766 pending = 777 pending =
767 GNUNET_malloc (sizeof (struct PendingMessage) + 778 GNUNET_malloc (sizeof (struct PendingMessage) +
diff --git a/src/dht/gnunet-service-dht_clients.c b/src/dht/gnunet-service-dht_clients.c
index b0641d6b2..6f7c1daae 100644
--- a/src/dht/gnunet-service-dht_clients.c
+++ b/src/dht/gnunet-service-dht_clients.c
@@ -411,7 +411,7 @@ handle_dht_local_put (void *cls, struct GNUNET_SERVER_Client *client,
411 dht_msg = (const struct GNUNET_DHT_ClientPutMessage *) message; 411 dht_msg = (const struct GNUNET_DHT_ClientPutMessage *) message;
412 /* give to local clients */ 412 /* give to local clients */
413 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 413 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
414 "Passing %u-byte reply for query %s to local clients\n", 414 "Handling local PUT of %u-bytes for query %s\n",
415 size - sizeof (struct GNUNET_DHT_ClientPutMessage), 415 size - sizeof (struct GNUNET_DHT_ClientPutMessage),
416 GNUNET_h2s (&dht_msg->key)); 416 GNUNET_h2s (&dht_msg->key));
417 GDS_CLIENTS_handle_reply (GNUNET_TIME_absolute_ntoh (dht_msg->expiration), 417 GDS_CLIENTS_handle_reply (GNUNET_TIME_absolute_ntoh (dht_msg->expiration),