aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/datastore/datastore.h2
-rw-r--r--src/datastore/datastore_api.c16
2 files changed, 16 insertions, 2 deletions
diff --git a/src/datastore/datastore.h b/src/datastore/datastore.h
index 55ca7c8e5..8fa0ca044 100644
--- a/src/datastore/datastore.h
+++ b/src/datastore/datastore.h
@@ -27,7 +27,7 @@
27#ifndef DATASTORE_H 27#ifndef DATASTORE_H
28#define DATASTORE_H 28#define DATASTORE_H
29 29
30#define DEBUG_DATASTORE GNUNET_YES 30#define DEBUG_DATASTORE GNUNET_NO
31 31
32#include "gnunet_util_lib.h" 32#include "gnunet_util_lib.h"
33 33
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index e0c184a57..58340ed6c 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -1090,6 +1090,13 @@ process_result_message (void *cls,
1090 _("Failed to receive response from database.\n")); 1090 _("Failed to receive response from database.\n"));
1091 do_disconnect (h); 1091 do_disconnect (h);
1092 } 1092 }
1093 else
1094 {
1095#if DEBUG_DATASTORE
1096 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1097 "Request dropped due to finite datastore queue length.\n");
1098#endif
1099 }
1093 if (rc.iter != NULL) 1100 if (rc.iter != NULL)
1094 rc.iter (rc.iter_cls, 1101 rc.iter (rc.iter_cls,
1095 NULL, 0, NULL, 0, 0, 0, 1102 NULL, 0, NULL, 0, 0, 0,
@@ -1307,7 +1314,14 @@ GNUNET_DATASTORE_get (struct GNUNET_DATASTORE_Handle *h,
1307 queue_priority, max_queue_size, timeout, 1314 queue_priority, max_queue_size, timeout,
1308 &process_result_message, &qc); 1315 &process_result_message, &qc);
1309 if (qe == NULL) 1316 if (qe == NULL)
1310 return NULL; 1317 {
1318#if DEBUG_DATASTORE
1319 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1320 "Could not queue request for `%s'\n",
1321 GNUNET_h2s (key));
1322#endif
1323 return NULL;
1324 }
1311 gm = (struct GetMessage*) &qe[1]; 1325 gm = (struct GetMessage*) &qe[1];
1312 gm->header.type = htons(GNUNET_MESSAGE_TYPE_DATASTORE_GET); 1326 gm->header.type = htons(GNUNET_MESSAGE_TYPE_DATASTORE_GET);
1313 gm->type = htonl(type); 1327 gm->type = htonl(type);