diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-04-23 05:54:35 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-04-23 05:54:35 +0000 |
commit | efd2deb413ae2069898563bb4c2a3e1b1ff5aafe (patch) | |
tree | 4b034985cb9711a48601b5b961fca813975a6ab3 /src/datastore | |
parent | ed4600154d6c08e82659024263152b76cbb67a63 (diff) | |
download | gnunet-efd2deb413ae2069898563bb4c2a3e1b1ff5aafe.tar.gz gnunet-efd2deb413ae2069898563bb4c2a3e1b1ff5aafe.zip |
-removing legacy DEBUG ifdefs
Diffstat (limited to 'src/datastore')
-rw-r--r-- | src/datastore/datastore_api.c | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c index f9d4dff7e..57663e99e 100644 --- a/src/datastore/datastore_api.c +++ b/src/datastore/datastore_api.c | |||
@@ -329,9 +329,7 @@ GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h, int drop) | |||
329 | { | 329 | { |
330 | struct GNUNET_DATASTORE_QueueEntry *qe; | 330 | struct GNUNET_DATASTORE_QueueEntry *qe; |
331 | 331 | ||
332 | #if DEBUG_DATASTORE | ||
333 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Datastore disconnect\n"); | 332 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Datastore disconnect\n"); |
334 | #endif | ||
335 | if (NULL != h->th) | 333 | if (NULL != h->th) |
336 | { | 334 | { |
337 | GNUNET_CLIENT_notify_transmit_ready_cancel (h->th); | 335 | GNUNET_CLIENT_notify_transmit_ready_cancel (h->th); |
@@ -391,9 +389,7 @@ timeout_queue_entry (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
391 | GNUNET_NO); | 389 | GNUNET_NO); |
392 | qe->task = GNUNET_SCHEDULER_NO_TASK; | 390 | qe->task = GNUNET_SCHEDULER_NO_TASK; |
393 | GNUNET_assert (qe->was_transmitted == GNUNET_NO); | 391 | GNUNET_assert (qe->was_transmitted == GNUNET_NO); |
394 | #if DEBUG_DATASTORE | ||
395 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Timeout of request in datastore queue\n"); | 392 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Timeout of request in datastore queue\n"); |
396 | #endif | ||
397 | qe->response_proc (qe->h, NULL); | 393 | qe->response_proc (qe->h, NULL); |
398 | } | 394 | } |
399 | 395 | ||
@@ -473,9 +469,7 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h, size_t msize, | |||
473 | GNUNET_assert (pos->response_proc != NULL); | 469 | GNUNET_assert (pos->response_proc != NULL); |
474 | /* move 'pos' element to head so that it will be | 470 | /* move 'pos' element to head so that it will be |
475 | * killed on 'NULL' call below */ | 471 | * killed on 'NULL' call below */ |
476 | #if DEBUG_DATASTORE | ||
477 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Dropping request from datastore queue\n"); | 472 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Dropping request from datastore queue\n"); |
478 | #endif | ||
479 | GNUNET_CONTAINER_DLL_remove (h->queue_head, h->queue_tail, pos); | 473 | GNUNET_CONTAINER_DLL_remove (h->queue_head, h->queue_tail, pos); |
480 | GNUNET_CONTAINER_DLL_insert (h->queue_head, h->queue_tail, pos); | 474 | GNUNET_CONTAINER_DLL_insert (h->queue_head, h->queue_tail, pos); |
481 | GNUNET_STATISTICS_update (h->stats, | 475 | GNUNET_STATISTICS_update (h->stats, |
@@ -530,9 +524,7 @@ try_reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
530 | gettext_noop | 524 | gettext_noop |
531 | ("# datastore connections (re)created"), 1, | 525 | ("# datastore connections (re)created"), 1, |
532 | GNUNET_NO); | 526 | GNUNET_NO); |
533 | #if DEBUG_DATASTORE | ||
534 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Reconnected to DATASTORE\n"); | 527 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Reconnected to DATASTORE\n"); |
535 | #endif | ||
536 | process_queue (h); | 528 | process_queue (h); |
537 | } | 529 | } |
538 | 530 | ||
@@ -548,10 +540,8 @@ do_disconnect (struct GNUNET_DATASTORE_Handle *h) | |||
548 | { | 540 | { |
549 | if (h->client == NULL) | 541 | if (h->client == NULL) |
550 | { | 542 | { |
551 | #if DEBUG_DATASTORE | ||
552 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 543 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
553 | "client NULL in disconnect, will not try to reconnect\n"); | 544 | "client NULL in disconnect, will not try to reconnect\n"); |
554 | #endif | ||
555 | return; | 545 | return; |
556 | } | 546 | } |
557 | #if 0 | 547 | #if 0 |
@@ -580,9 +570,7 @@ receive_cb (void *cls, const struct GNUNET_MessageHeader *msg) | |||
580 | struct GNUNET_DATASTORE_QueueEntry *qe; | 570 | struct GNUNET_DATASTORE_QueueEntry *qe; |
581 | 571 | ||
582 | h->in_receive = GNUNET_NO; | 572 | h->in_receive = GNUNET_NO; |
583 | #if DEBUG_DATASTORE | ||
584 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Receiving reply from datastore\n"); | 573 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Receiving reply from datastore\n"); |
585 | #endif | ||
586 | if (h->skip_next_messages > 0) | 574 | if (h->skip_next_messages > 0) |
587 | { | 575 | { |
588 | h->skip_next_messages--; | 576 | h->skip_next_messages--; |
@@ -619,9 +607,7 @@ transmit_request (void *cls, size_t size, void *buf) | |||
619 | return 0; /* no entry in queue */ | 607 | return 0; /* no entry in queue */ |
620 | if (buf == NULL) | 608 | if (buf == NULL) |
621 | { | 609 | { |
622 | #if DEBUG_DATASTORE | ||
623 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Failed to transmit request to DATASTORE.\n"); | 610 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Failed to transmit request to DATASTORE.\n"); |
624 | #endif | ||
625 | GNUNET_STATISTICS_update (h->stats, | 611 | GNUNET_STATISTICS_update (h->stats, |
626 | gettext_noop ("# transmission request failures"), | 612 | gettext_noop ("# transmission request failures"), |
627 | 1, GNUNET_NO); | 613 | 1, GNUNET_NO); |
@@ -633,10 +619,8 @@ transmit_request (void *cls, size_t size, void *buf) | |||
633 | process_queue (h); | 619 | process_queue (h); |
634 | return 0; | 620 | return 0; |
635 | } | 621 | } |
636 | #if DEBUG_DATASTORE | ||
637 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Transmitting %u byte request to DATASTORE\n", | 622 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Transmitting %u byte request to DATASTORE\n", |
638 | msize); | 623 | msize); |
639 | #endif | ||
640 | memcpy (buf, &qe[1], msize); | 624 | memcpy (buf, &qe[1], msize); |
641 | qe->was_transmitted = GNUNET_YES; | 625 | qe->was_transmitted = GNUNET_YES; |
642 | GNUNET_SCHEDULER_cancel (qe->task); | 626 | GNUNET_SCHEDULER_cancel (qe->task); |
@@ -665,30 +649,22 @@ process_queue (struct GNUNET_DATASTORE_Handle *h) | |||
665 | 649 | ||
666 | if (NULL == (qe = h->queue_head)) | 650 | if (NULL == (qe = h->queue_head)) |
667 | { | 651 | { |
668 | #if DEBUG_DATASTORE > 1 | ||
669 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Queue empty\n"); | 652 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Queue empty\n"); |
670 | #endif | ||
671 | return; /* no entry in queue */ | 653 | return; /* no entry in queue */ |
672 | } | 654 | } |
673 | if (qe->was_transmitted == GNUNET_YES) | 655 | if (qe->was_transmitted == GNUNET_YES) |
674 | { | 656 | { |
675 | #if DEBUG_DATASTORE > 1 | ||
676 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Head request already transmitted\n"); | 657 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Head request already transmitted\n"); |
677 | #endif | ||
678 | return; /* waiting for replies */ | 658 | return; /* waiting for replies */ |
679 | } | 659 | } |
680 | if (h->th != NULL) | 660 | if (h->th != NULL) |
681 | { | 661 | { |
682 | #if DEBUG_DATASTORE > 1 | ||
683 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Pending transmission request\n"); | 662 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Pending transmission request\n"); |
684 | #endif | ||
685 | return; /* request pending */ | 663 | return; /* request pending */ |
686 | } | 664 | } |
687 | if (h->client == NULL) | 665 | if (h->client == NULL) |
688 | { | 666 | { |
689 | #if DEBUG_DATASTORE > 1 | ||
690 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Not connected\n"); | 667 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Not connected\n"); |
691 | #endif | ||
692 | return; /* waiting for reconnect */ | 668 | return; /* waiting for reconnect */ |
693 | } | 669 | } |
694 | if (GNUNET_YES == h->in_receive) | 670 | if (GNUNET_YES == h->in_receive) |
@@ -696,10 +672,8 @@ process_queue (struct GNUNET_DATASTORE_Handle *h) | |||
696 | /* wait for response to previous query */ | 672 | /* wait for response to previous query */ |
697 | return; | 673 | return; |
698 | } | 674 | } |
699 | #if DEBUG_DATASTORE | ||
700 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Queueing %u byte request to DATASTORE\n", | 675 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Queueing %u byte request to DATASTORE\n", |
701 | qe->message_size); | 676 | qe->message_size); |
702 | #endif | ||
703 | h->th = | 677 | h->th = |
704 | GNUNET_CLIENT_notify_transmit_ready (h->client, qe->message_size, | 678 | GNUNET_CLIENT_notify_transmit_ready (h->client, qe->message_size, |
705 | GNUNET_TIME_absolute_get_remaining | 679 | GNUNET_TIME_absolute_get_remaining |
@@ -821,9 +795,7 @@ process_status_message (void *cls, const struct GNUNET_MessageHeader *msg) | |||
821 | GNUNET_break (0); | 795 | GNUNET_break (0); |
822 | emsg = _("Invalid error message received from datastore service"); | 796 | emsg = _("Invalid error message received from datastore service"); |
823 | } | 797 | } |
824 | #if DEBUG_DATASTORE | ||
825 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Received status %d/%s\n", (int) status, emsg); | 798 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Received status %d/%s\n", (int) status, emsg); |
826 | #endif | ||
827 | GNUNET_STATISTICS_update (h->stats, | 799 | GNUNET_STATISTICS_update (h->stats, |
828 | gettext_noop ("# status messages received"), 1, | 800 | gettext_noop ("# status messages received"), 1, |
829 | GNUNET_NO); | 801 | GNUNET_NO); |
@@ -879,12 +851,10 @@ GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid, | |||
879 | size_t msize; | 851 | size_t msize; |
880 | union QueueContext qc; | 852 | union QueueContext qc; |
881 | 853 | ||
882 | #if DEBUG_DATASTORE | ||
883 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 854 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
884 | "Asked to put %u bytes of data under key `%s' for %llu ms\n", size, | 855 | "Asked to put %u bytes of data under key `%s' for %llu ms\n", size, |
885 | GNUNET_h2s (key), | 856 | GNUNET_h2s (key), |
886 | GNUNET_TIME_absolute_get_remaining (expiration).rel_value); | 857 | GNUNET_TIME_absolute_get_remaining (expiration).rel_value); |
887 | #endif | ||
888 | msize = sizeof (struct DataMessage) + size; | 858 | msize = sizeof (struct DataMessage) + size; |
889 | GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE); | 859 | GNUNET_assert (msize < GNUNET_SERVER_MAX_MESSAGE_SIZE); |
890 | qc.sc.cont = cont; | 860 | qc.sc.cont = cont; |
@@ -893,9 +863,7 @@ GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid, | |||
893 | &process_status_message, &qc); | 863 | &process_status_message, &qc); |
894 | if (qe == NULL) | 864 | if (qe == NULL) |
895 | { | 865 | { |
896 | #if DEBUG_DATASTORE | ||
897 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Could not create queue entry for PUT\n"); | 866 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Could not create queue entry for PUT\n"); |
898 | #endif | ||
899 | return NULL; | 867 | return NULL; |
900 | } | 868 | } |
901 | GNUNET_STATISTICS_update (h->stats, gettext_noop ("# PUT requests executed"), | 869 | GNUNET_STATISTICS_update (h->stats, gettext_noop ("# PUT requests executed"), |
@@ -952,20 +920,16 @@ GNUNET_DATASTORE_reserve (struct GNUNET_DATASTORE_Handle *h, uint64_t amount, | |||
952 | 920 | ||
953 | if (cont == NULL) | 921 | if (cont == NULL) |
954 | cont = &drop_status_cont; | 922 | cont = &drop_status_cont; |
955 | #if DEBUG_DATASTORE | ||
956 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 923 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
957 | "Asked to reserve %llu bytes of data and %u entries\n", | 924 | "Asked to reserve %llu bytes of data and %u entries\n", |
958 | (unsigned long long) amount, (unsigned int) entries); | 925 | (unsigned long long) amount, (unsigned int) entries); |
959 | #endif | ||
960 | qc.sc.cont = cont; | 926 | qc.sc.cont = cont; |
961 | qc.sc.cont_cls = cont_cls; | 927 | qc.sc.cont_cls = cont_cls; |
962 | qe = make_queue_entry (h, sizeof (struct ReserveMessage), queue_priority, | 928 | qe = make_queue_entry (h, sizeof (struct ReserveMessage), queue_priority, |
963 | max_queue_size, timeout, &process_status_message, &qc); | 929 | max_queue_size, timeout, &process_status_message, &qc); |
964 | if (qe == NULL) | 930 | if (qe == NULL) |
965 | { | 931 | { |
966 | #if DEBUG_DATASTORE | ||
967 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Could not create queue entry to reserve\n"); | 932 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Could not create queue entry to reserve\n"); |
968 | #endif | ||
969 | return NULL; | 933 | return NULL; |
970 | } | 934 | } |
971 | GNUNET_STATISTICS_update (h->stats, | 935 | GNUNET_STATISTICS_update (h->stats, |
@@ -1016,9 +980,7 @@ GNUNET_DATASTORE_release_reserve (struct GNUNET_DATASTORE_Handle *h, | |||
1016 | 980 | ||
1017 | if (cont == NULL) | 981 | if (cont == NULL) |
1018 | cont = &drop_status_cont; | 982 | cont = &drop_status_cont; |
1019 | #if DEBUG_DATASTORE | ||
1020 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Asked to release reserve %d\n", rid); | 983 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Asked to release reserve %d\n", rid); |
1021 | #endif | ||
1022 | qc.sc.cont = cont; | 984 | qc.sc.cont = cont; |
1023 | qc.sc.cont_cls = cont_cls; | 985 | qc.sc.cont_cls = cont_cls; |
1024 | qe = make_queue_entry (h, sizeof (struct ReleaseReserveMessage), | 986 | qe = make_queue_entry (h, sizeof (struct ReleaseReserveMessage), |
@@ -1026,10 +988,8 @@ GNUNET_DATASTORE_release_reserve (struct GNUNET_DATASTORE_Handle *h, | |||
1026 | &process_status_message, &qc); | 988 | &process_status_message, &qc); |
1027 | if (qe == NULL) | 989 | if (qe == NULL) |
1028 | { | 990 | { |
1029 | #if DEBUG_DATASTORE | ||
1030 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 991 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1031 | "Could not create queue entry to release reserve\n"); | 992 | "Could not create queue entry to release reserve\n"); |
1032 | #endif | ||
1033 | return NULL; | 993 | return NULL; |
1034 | } | 994 | } |
1035 | GNUNET_STATISTICS_update (h->stats, | 995 | GNUNET_STATISTICS_update (h->stats, |
@@ -1078,20 +1038,16 @@ GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h, uint64_t uid, | |||
1078 | 1038 | ||
1079 | if (cont == NULL) | 1039 | if (cont == NULL) |
1080 | cont = &drop_status_cont; | 1040 | cont = &drop_status_cont; |
1081 | #if DEBUG_DATASTORE | ||
1082 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1041 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1083 | "Asked to update entry %llu raising priority by %u and expiration to %llu\n", | 1042 | "Asked to update entry %llu raising priority by %u and expiration to %llu\n", |
1084 | uid, (unsigned int) priority, (unsigned long long) expiration.abs_value); | 1043 | uid, (unsigned int) priority, (unsigned long long) expiration.abs_value); |
1085 | #endif | ||
1086 | qc.sc.cont = cont; | 1044 | qc.sc.cont = cont; |
1087 | qc.sc.cont_cls = cont_cls; | 1045 | qc.sc.cont_cls = cont_cls; |
1088 | qe = make_queue_entry (h, sizeof (struct UpdateMessage), queue_priority, | 1046 | qe = make_queue_entry (h, sizeof (struct UpdateMessage), queue_priority, |
1089 | max_queue_size, timeout, &process_status_message, &qc); | 1047 | max_queue_size, timeout, &process_status_message, &qc); |
1090 | if (qe == NULL) | 1048 | if (qe == NULL) |
1091 | { | 1049 | { |
1092 | #if DEBUG_DATASTORE | ||
1093 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Could not create queue entry for UPDATE\n"); | 1050 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Could not create queue entry for UPDATE\n"); |
1094 | #endif | ||
1095 | return NULL; | 1051 | return NULL; |
1096 | } | 1052 | } |
1097 | GNUNET_STATISTICS_update (h->stats, | 1053 | GNUNET_STATISTICS_update (h->stats, |
@@ -1145,10 +1101,8 @@ GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h, | |||
1145 | 1101 | ||
1146 | if (cont == NULL) | 1102 | if (cont == NULL) |
1147 | cont = &drop_status_cont; | 1103 | cont = &drop_status_cont; |
1148 | #if DEBUG_DATASTORE | ||
1149 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Asked to remove %u bytes under key `%s'\n", | 1104 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Asked to remove %u bytes under key `%s'\n", |
1150 | size, GNUNET_h2s (key)); | 1105 | size, GNUNET_h2s (key)); |
1151 | #endif | ||
1152 | qc.sc.cont = cont; | 1106 | qc.sc.cont = cont; |
1153 | qc.sc.cont_cls = cont_cls; | 1107 | qc.sc.cont_cls = cont_cls; |
1154 | msize = sizeof (struct DataMessage) + size; | 1108 | msize = sizeof (struct DataMessage) + size; |
@@ -1157,9 +1111,7 @@ GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h, | |||
1157 | &process_status_message, &qc); | 1111 | &process_status_message, &qc); |
1158 | if (qe == NULL) | 1112 | if (qe == NULL) |
1159 | { | 1113 | { |
1160 | #if DEBUG_DATASTORE | ||
1161 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Could not create queue entry for REMOVE\n"); | 1114 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Could not create queue entry for REMOVE\n"); |
1162 | #endif | ||
1163 | return NULL; | 1115 | return NULL; |
1164 | } | 1116 | } |
1165 | GNUNET_STATISTICS_update (h->stats, | 1117 | GNUNET_STATISTICS_update (h->stats, |
@@ -1227,10 +1179,8 @@ process_result_message (void *cls, const struct GNUNET_MessageHeader *msg) | |||
1227 | rc = qe->qc.rc; | 1179 | rc = qe->qc.rc; |
1228 | GNUNET_assert (GNUNET_YES == qe->was_transmitted); | 1180 | GNUNET_assert (GNUNET_YES == qe->was_transmitted); |
1229 | free_queue_entry (qe); | 1181 | free_queue_entry (qe); |
1230 | #if DEBUG_DATASTORE | ||
1231 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1182 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1232 | "Received end of result set, new queue size is %u\n", h->queue_size); | 1183 | "Received end of result set, new queue size is %u\n", h->queue_size); |
1233 | #endif | ||
1234 | h->retry_time.rel_value = 0; | 1184 | h->retry_time.rel_value = 0; |
1235 | h->result_count = 0; | 1185 | h->result_count = 0; |
1236 | process_queue (h); | 1186 | process_queue (h); |
@@ -1271,12 +1221,10 @@ process_result_message (void *cls, const struct GNUNET_MessageHeader *msg) | |||
1271 | GNUNET_STATISTICS_update (h->stats, gettext_noop ("# Results received"), 1, | 1221 | GNUNET_STATISTICS_update (h->stats, gettext_noop ("# Results received"), 1, |
1272 | GNUNET_NO); | 1222 | GNUNET_NO); |
1273 | dm = (const struct DataMessage *) msg; | 1223 | dm = (const struct DataMessage *) msg; |
1274 | #if DEBUG_DATASTORE | ||
1275 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1224 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1276 | "Received result %llu with type %u and size %u with key %s\n", | 1225 | "Received result %llu with type %u and size %u with key %s\n", |
1277 | (unsigned long long) GNUNET_ntohll (dm->uid), ntohl (dm->type), | 1226 | (unsigned long long) GNUNET_ntohll (dm->uid), ntohl (dm->type), |
1278 | ntohl (dm->size), GNUNET_h2s (&dm->key)); | 1227 | ntohl (dm->size), GNUNET_h2s (&dm->key)); |
1279 | #endif | ||
1280 | free_queue_entry (qe); | 1228 | free_queue_entry (qe); |
1281 | h->retry_time.rel_value = 0; | 1229 | h->retry_time.rel_value = 0; |
1282 | process_queue (h); | 1230 | process_queue (h); |
@@ -1320,10 +1268,8 @@ GNUNET_DATASTORE_get_for_replication (struct GNUNET_DATASTORE_Handle *h, | |||
1320 | union QueueContext qc; | 1268 | union QueueContext qc; |
1321 | 1269 | ||
1322 | GNUNET_assert (NULL != proc); | 1270 | GNUNET_assert (NULL != proc); |
1323 | #if DEBUG_DATASTORE | ||
1324 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Asked to get replication entry in %llu ms\n", | 1271 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Asked to get replication entry in %llu ms\n", |
1325 | (unsigned long long) timeout.rel_value); | 1272 | (unsigned long long) timeout.rel_value); |
1326 | #endif | ||
1327 | qc.rc.proc = proc; | 1273 | qc.rc.proc = proc; |
1328 | qc.rc.proc_cls = proc_cls; | 1274 | qc.rc.proc_cls = proc_cls; |
1329 | qe = make_queue_entry (h, sizeof (struct GNUNET_MessageHeader), | 1275 | qe = make_queue_entry (h, sizeof (struct GNUNET_MessageHeader), |
@@ -1331,10 +1277,8 @@ GNUNET_DATASTORE_get_for_replication (struct GNUNET_DATASTORE_Handle *h, | |||
1331 | &process_result_message, &qc); | 1277 | &process_result_message, &qc); |
1332 | if (qe == NULL) | 1278 | if (qe == NULL) |
1333 | { | 1279 | { |
1334 | #if DEBUG_DATASTORE | ||
1335 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1280 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1336 | "Could not create queue entry for GET REPLICATION\n"); | 1281 | "Could not create queue entry for GET REPLICATION\n"); |
1337 | #endif | ||
1338 | return NULL; | 1282 | return NULL; |
1339 | } | 1283 | } |
1340 | GNUNET_STATISTICS_update (h->stats, | 1284 | GNUNET_STATISTICS_update (h->stats, |
@@ -1385,12 +1329,10 @@ GNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h, | |||
1385 | 1329 | ||
1386 | GNUNET_assert (NULL != proc); | 1330 | GNUNET_assert (NULL != proc); |
1387 | GNUNET_assert (type != GNUNET_BLOCK_TYPE_ANY); | 1331 | GNUNET_assert (type != GNUNET_BLOCK_TYPE_ANY); |
1388 | #if DEBUG_DATASTORE | ||
1389 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1332 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1390 | "Asked to get %llu-th zero-anonymity entry of type %d in %llu ms\n", | 1333 | "Asked to get %llu-th zero-anonymity entry of type %d in %llu ms\n", |
1391 | (unsigned long long) offset, type, | 1334 | (unsigned long long) offset, type, |
1392 | (unsigned long long) timeout.rel_value); | 1335 | (unsigned long long) timeout.rel_value); |
1393 | #endif | ||
1394 | qc.rc.proc = proc; | 1336 | qc.rc.proc = proc; |
1395 | qc.rc.proc_cls = proc_cls; | 1337 | qc.rc.proc_cls = proc_cls; |
1396 | qe = make_queue_entry (h, sizeof (struct GetZeroAnonymityMessage), | 1338 | qe = make_queue_entry (h, sizeof (struct GetZeroAnonymityMessage), |
@@ -1398,10 +1340,8 @@ GNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h, | |||
1398 | &process_result_message, &qc); | 1340 | &process_result_message, &qc); |
1399 | if (qe == NULL) | 1341 | if (qe == NULL) |
1400 | { | 1342 | { |
1401 | #if DEBUG_DATASTORE | ||
1402 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1343 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1403 | "Could not create queue entry for zero-anonymity procation\n"); | 1344 | "Could not create queue entry for zero-anonymity procation\n"); |
1404 | #endif | ||
1405 | return NULL; | 1345 | return NULL; |
1406 | } | 1346 | } |
1407 | GNUNET_STATISTICS_update (h->stats, | 1347 | GNUNET_STATISTICS_update (h->stats, |
@@ -1453,21 +1393,17 @@ GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset, | |||
1453 | union QueueContext qc; | 1393 | union QueueContext qc; |
1454 | 1394 | ||
1455 | GNUNET_assert (NULL != proc); | 1395 | GNUNET_assert (NULL != proc); |
1456 | #if DEBUG_DATASTORE | ||
1457 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1396 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1458 | "Asked to look for data of type %u under key `%s'\n", | 1397 | "Asked to look for data of type %u under key `%s'\n", |
1459 | (unsigned int) type, GNUNET_h2s (key)); | 1398 | (unsigned int) type, GNUNET_h2s (key)); |
1460 | #endif | ||
1461 | qc.rc.proc = proc; | 1399 | qc.rc.proc = proc; |
1462 | qc.rc.proc_cls = proc_cls; | 1400 | qc.rc.proc_cls = proc_cls; |
1463 | qe = make_queue_entry (h, sizeof (struct GetMessage), queue_priority, | 1401 | qe = make_queue_entry (h, sizeof (struct GetMessage), queue_priority, |
1464 | max_queue_size, timeout, &process_result_message, &qc); | 1402 | max_queue_size, timeout, &process_result_message, &qc); |
1465 | if (qe == NULL) | 1403 | if (qe == NULL) |
1466 | { | 1404 | { |
1467 | #if DEBUG_DATASTORE | ||
1468 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Could not queue request for `%s'\n", | 1405 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Could not queue request for `%s'\n", |
1469 | GNUNET_h2s (key)); | 1406 | GNUNET_h2s (key)); |
1470 | #endif | ||
1471 | return NULL; | 1407 | return NULL; |
1472 | } | 1408 | } |
1473 | GNUNET_STATISTICS_update (h->stats, gettext_noop ("# GET requests executed"), | 1409 | GNUNET_STATISTICS_update (h->stats, gettext_noop ("# GET requests executed"), |
@@ -1504,11 +1440,9 @@ GNUNET_DATASTORE_cancel (struct GNUNET_DATASTORE_QueueEntry *qe) | |||
1504 | 1440 | ||
1505 | GNUNET_assert (GNUNET_SYSERR != qe->was_transmitted); | 1441 | GNUNET_assert (GNUNET_SYSERR != qe->was_transmitted); |
1506 | h = qe->h; | 1442 | h = qe->h; |
1507 | #if DEBUG_DATASTORE | ||
1508 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 1443 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
1509 | "Pending DATASTORE request %p cancelled (%d, %d)\n", qe, | 1444 | "Pending DATASTORE request %p cancelled (%d, %d)\n", qe, |
1510 | qe->was_transmitted, h->queue_head == qe); | 1445 | qe->was_transmitted, h->queue_head == qe); |
1511 | #endif | ||
1512 | if (GNUNET_YES == qe->was_transmitted) | 1446 | if (GNUNET_YES == qe->was_transmitted) |
1513 | { | 1447 | { |
1514 | free_queue_entry (qe); | 1448 | free_queue_entry (qe); |