aboutsummaryrefslogtreecommitdiff
path: root/src/datastore
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-06-17 13:31:10 +0000
committerChristian Grothoff <christian@grothoff.org>2011-06-17 13:31:10 +0000
commit4d221c9bfc9d72fca21e07b6b052d007c75ebedc (patch)
treee69e1339823246c48fe40584aece7ebc72c910e6 /src/datastore
parent89c9cb7c978a7a79776d940cadf13740c315b632 (diff)
downloadgnunet-4d221c9bfc9d72fca21e07b6b052d007c75ebedc.tar.gz
gnunet-4d221c9bfc9d72fca21e07b6b052d007c75ebedc.zip
debugs
Diffstat (limited to 'src/datastore')
-rw-r--r--src/datastore/datastore_api.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index 67125c451..f355dfab5 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -315,6 +315,10 @@ GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h,
315{ 315{
316 struct GNUNET_DATASTORE_QueueEntry *qe; 316 struct GNUNET_DATASTORE_QueueEntry *qe;
317 317
318#if DEBUG_DATASTORE
319 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
320 "Datastore disconnect\n");
321#endif
318 if (NULL != h->th) 322 if (NULL != h->th)
319 { 323 {
320 GNUNET_CLIENT_notify_transmit_ready_cancel (h->th); 324 GNUNET_CLIENT_notify_transmit_ready_cancel (h->th);
@@ -378,6 +382,10 @@ timeout_queue_entry (void *cls,
378 GNUNET_NO); 382 GNUNET_NO);
379 qe->task = GNUNET_SCHEDULER_NO_TASK; 383 qe->task = GNUNET_SCHEDULER_NO_TASK;
380 GNUNET_assert (qe->was_transmitted == GNUNET_NO); 384 GNUNET_assert (qe->was_transmitted == GNUNET_NO);
385#if DEBUG_DATASTORE
386 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
387 "Timeout of request in datastore queue\n");
388#endif
381 qe->response_proc (qe->h, NULL); 389 qe->response_proc (qe->h, NULL);
382} 390}
383 391
@@ -471,6 +479,10 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h,
471 GNUNET_assert (pos->response_proc != NULL); 479 GNUNET_assert (pos->response_proc != NULL);
472 /* move 'pos' element to head so that it will be 480 /* move 'pos' element to head so that it will be
473 killed on 'NULL' call below */ 481 killed on 'NULL' call below */
482#if DEBUG_DATASTORE
483 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
484 "Dropping request from datastore queue\n");
485#endif
474 GNUNET_CONTAINER_DLL_remove (h->queue_head, 486 GNUNET_CONTAINER_DLL_remove (h->queue_head,
475 h->queue_tail, 487 h->queue_tail,
476 pos); 488 pos);
@@ -586,6 +598,10 @@ receive_cb (void *cls,
586 struct GNUNET_DATASTORE_QueueEntry *qe; 598 struct GNUNET_DATASTORE_QueueEntry *qe;
587 599
588 h->in_receive = GNUNET_NO; 600 h->in_receive = GNUNET_NO;
601#if DEBUG_DATASTORE
602 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
603 "Receiving reply from datastore\n");
604#endif
589 if (h->skip_next_messages > 0) 605 if (h->skip_next_messages > 0)
590 { 606 {
591 h->skip_next_messages--; 607 h->skip_next_messages--;
@@ -987,7 +1003,7 @@ GNUNET_DATASTORE_reserve (struct GNUNET_DATASTORE_Handle *h,
987 cont = &drop_status_cont; 1003 cont = &drop_status_cont;
988#if DEBUG_DATASTORE 1004#if DEBUG_DATASTORE
989 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1005 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
990 "Asked to reserve %llu bytes of data and %u entries'\n", 1006 "Asked to reserve %llu bytes of data and %u entries\n",
991 (unsigned long long) amount, 1007 (unsigned long long) amount,
992 (unsigned int) entries); 1008 (unsigned int) entries);
993#endif 1009#endif