aboutsummaryrefslogtreecommitdiff
path: root/src/dht
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-03-14 12:49:54 +0000
committerBart Polot <bart@net.in.tum.de>2013-03-14 12:49:54 +0000
commit230237efe134ec2e826ae9976cadfc582b735338 (patch)
tree29fa3b3380ee88ed9c7568537c84021353fca873 /src/dht
parent09da1fa28c1847c08e9489a55ba7ae0212e22439 (diff)
downloadgnunet-230237efe134ec2e826ae9976cadfc582b735338.tar.gz
gnunet-230237efe134ec2e826ae9976cadfc582b735338.zip
- debug info
Diffstat (limited to 'src/dht')
-rw-r--r--src/dht/gnunet-service-dht_clients.c38
-rw-r--r--src/dht/gnunet-service-dht_datacache.c2
2 files changed, 21 insertions, 19 deletions
diff --git a/src/dht/gnunet-service-dht_clients.c b/src/dht/gnunet-service-dht_clients.c
index 3a25cd88e..bc66407ca 100644
--- a/src/dht/gnunet-service-dht_clients.c
+++ b/src/dht/gnunet-service-dht_clients.c
@@ -590,8 +590,8 @@ handle_dht_local_get (void *cls, struct GNUNET_SERVER_Client *client,
590 ("# GET requests received from clients"), 1, 590 ("# GET requests received from clients"), 1,
591 GNUNET_NO); 591 GNUNET_NO);
592 LOG (GNUNET_ERROR_TYPE_DEBUG, 592 LOG (GNUNET_ERROR_TYPE_DEBUG,
593 "Received GET request for %s from local client %p\n", 593 "Received GET request for %s from local client %p, xq: %.*s\n",
594 GNUNET_h2s (&get->key), client); 594 GNUNET_h2s (&get->key), client, xquery_size, xquery);
595 595
596 if (LOG_ROUTE_DETAILS_STDERR) 596 if (LOG_ROUTE_DETAILS_STDERR)
597 { 597 {
@@ -1026,16 +1026,16 @@ forward_reply (void *cls, const struct GNUNET_HashCode * key, void *value)
1026 1026
1027 if (LOG_ROUTE_DETAILS_STDERR) 1027 if (LOG_ROUTE_DETAILS_STDERR)
1028 { 1028 {
1029 fprintf (stderr, 1029 LOG (GNUNET_ERROR_TYPE_DEBUG,
1030 "XDHT CLIENT-RESULT %s @ %u\n", 1030 "XDHT CLIENT-RESULT %s @ %u\n",
1031 GNUNET_h2s (key), 1031 GNUNET_h2s (key),
1032 getpid ()); 1032 getpid ());
1033 } 1033 }
1034 if ((record->type != GNUNET_BLOCK_TYPE_ANY) && (record->type != frc->type)) 1034 if ((record->type != GNUNET_BLOCK_TYPE_ANY) && (record->type != frc->type))
1035 { 1035 {
1036 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1036 LOG (GNUNET_ERROR_TYPE_DEBUG,
1037 "Record type missmatch, not passing request for key %s to local client\n", 1037 "Record type missmatch, not passing request for key %s to local client\n",
1038 GNUNET_h2s (key)); 1038 GNUNET_h2s (key));
1039 GNUNET_STATISTICS_update (GDS_stats, 1039 GNUNET_STATISTICS_update (GDS_stats,
1040 gettext_noop 1040 gettext_noop
1041 ("# Key match, type mismatches in REPLY to CLIENT"), 1041 ("# Key match, type mismatches in REPLY to CLIENT"),
@@ -1046,9 +1046,9 @@ forward_reply (void *cls, const struct GNUNET_HashCode * key, void *value)
1046 for (i = 0; i < record->seen_replies_count; i++) 1046 for (i = 0; i < record->seen_replies_count; i++)
1047 if (0 == memcmp (&record->seen_replies[i], &ch, sizeof (struct GNUNET_HashCode))) 1047 if (0 == memcmp (&record->seen_replies[i], &ch, sizeof (struct GNUNET_HashCode)))
1048 { 1048 {
1049 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1049 LOG (GNUNET_ERROR_TYPE_DEBUG,
1050 "Duplicate reply, not passing request for key %s to local client\n", 1050 "Duplicate reply, not passing request for key %s to local client\n",
1051 GNUNET_h2s (key)); 1051 GNUNET_h2s (key));
1052 GNUNET_STATISTICS_update (GDS_stats, 1052 GNUNET_STATISTICS_update (GDS_stats,
1053 gettext_noop 1053 gettext_noop
1054 ("# Duplicate REPLIES to CLIENT request dropped"), 1054 ("# Duplicate REPLIES to CLIENT request dropped"),
@@ -1059,9 +1059,9 @@ forward_reply (void *cls, const struct GNUNET_HashCode * key, void *value)
1059 GNUNET_BLOCK_evaluate (GDS_block_context, record->type, key, NULL, 0, 1059 GNUNET_BLOCK_evaluate (GDS_block_context, record->type, key, NULL, 0,
1060 record->xquery, record->xquery_size, frc->data, 1060 record->xquery, record->xquery_size, frc->data,
1061 frc->data_size); 1061 frc->data_size);
1062 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1062 LOG (GNUNET_ERROR_TYPE_DEBUG,
1063 "Evaluation result is %d for key %s for local client's query\n", 1063 "Evaluation result is %d for key %s for local client's query\n",
1064 (int) eval, GNUNET_h2s (key)); 1064 (int) eval, GNUNET_h2s (key));
1065 switch (eval) 1065 switch (eval)
1066 { 1066 {
1067 case GNUNET_BLOCK_EVALUATION_OK_LAST: 1067 case GNUNET_BLOCK_EVALUATION_OK_LAST:
@@ -1115,9 +1115,9 @@ forward_reply (void *cls, const struct GNUNET_HashCode * key, void *value)
1115 GNUNET_NO); 1115 GNUNET_NO);
1116 reply = (struct GNUNET_DHT_ClientResultMessage *) &pm[1]; 1116 reply = (struct GNUNET_DHT_ClientResultMessage *) &pm[1];
1117 reply->unique_id = record->unique_id; 1117 reply->unique_id = record->unique_id;
1118 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1118 LOG (GNUNET_ERROR_TYPE_DEBUG,
1119 "Queueing reply to query %s for client %p\n", GNUNET_h2s (key), 1119 "Queueing reply to query %s for client %p\n", GNUNET_h2s (key),
1120 record->client->client_handle); 1120 record->client->client_handle);
1121 add_pending_message (record->client, pm); 1121 add_pending_message (record->client, pm);
1122 if (GNUNET_YES == do_free) 1122 if (GNUNET_YES == do_free)
1123 remove_client_records (record->client, key, record); 1123 remove_client_records (record->client, key, record);
@@ -1156,6 +1156,8 @@ GDS_CLIENTS_handle_reply (struct GNUNET_TIME_Absolute expiration,
1156 struct GNUNET_PeerIdentity *paths; 1156 struct GNUNET_PeerIdentity *paths;
1157 size_t msize; 1157 size_t msize;
1158 1158
1159 LOG (GNUNET_ERROR_TYPE_DEBUG, "reply for key %s\n", GNUNET_h2s (key));
1160
1159 if (NULL == GNUNET_CONTAINER_multihashmap_get (forward_map, key)) 1161 if (NULL == GNUNET_CONTAINER_multihashmap_get (forward_map, key))
1160 { 1162 {
1161 GNUNET_STATISTICS_update (GDS_stats, 1163 GNUNET_STATISTICS_update (GDS_stats,
diff --git a/src/dht/gnunet-service-dht_datacache.c b/src/dht/gnunet-service-dht_datacache.c
index c50b438fc..6f25a90d7 100644
--- a/src/dht/gnunet-service-dht_datacache.c
+++ b/src/dht/gnunet-service-dht_datacache.c
@@ -157,8 +157,8 @@ datacache_get_iterator (void *cls,
157 ctx->eval = eval; 157 ctx->eval = eval;
158 switch (eval) 158 switch (eval)
159 { 159 {
160 case GNUNET_BLOCK_EVALUATION_OK_LAST:
161 case GNUNET_BLOCK_EVALUATION_OK_MORE: 160 case GNUNET_BLOCK_EVALUATION_OK_MORE:
161 case GNUNET_BLOCK_EVALUATION_OK_LAST:
162 /* forward to local clients */ 162 /* forward to local clients */
163 GNUNET_STATISTICS_update (GDS_stats, 163 GNUNET_STATISTICS_update (GDS_stats,
164 gettext_noop 164 gettext_noop