aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/datastore/datastore_api.c10
-rw-r--r--src/datastore/gnunet-service-datastore.c17
2 files changed, 21 insertions, 6 deletions
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index 3e2df3bc0..f6d7480de 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -367,8 +367,9 @@ GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h,
367 367
368#if DEBUG_DATASTORE 368#if DEBUG_DATASTORE
369 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 369 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
370 "Asked to put %u bytes of data\n", 370 "Asked to put %u bytes of data under key `%s'\n",
371 size); 371 size,
372 GNUNET_h2s (key));
372#endif 373#endif
373 msize = sizeof(struct DataMessage) + size; 374 msize = sizeof(struct DataMessage) + size;
374 GNUNET_assert (msize <= GNUNET_SERVER_MAX_MESSAGE_SIZE); 375 GNUNET_assert (msize <= GNUNET_SERVER_MAX_MESSAGE_SIZE);
@@ -722,6 +723,11 @@ GNUNET_DATASTORE_get (struct GNUNET_DATASTORE_Handle *h,
722{ 723{
723 struct GetMessage *gm; 724 struct GetMessage *gm;
724 725
726#if DEBUG_DATASTORE
727 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
728 "Asked to look for data under key `%s'\n",
729 GNUNET_h2s (key));
730#endif
725 gm = (struct GetMessage*) &h[1]; 731 gm = (struct GetMessage*) &h[1];
726 gm->header.type = htons(GNUNET_MESSAGE_TYPE_DATASTORE_GET); 732 gm->header.type = htons(GNUNET_MESSAGE_TYPE_DATASTORE_GET);
727 gm->type = htonl(type); 733 gm->type = htonl(type);
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c
index f80abef06..0fe1263ce 100644
--- a/src/datastore/gnunet-service-datastore.c
+++ b/src/datastore/gnunet-service-datastore.c
@@ -849,8 +849,16 @@ handle_put (void *cls,
849 GNUNET_TIME_absolute_ntoh(dm->expiration), 849 GNUNET_TIME_absolute_ntoh(dm->expiration),
850 &msg); 850 &msg);
851 if (GNUNET_OK == ret) 851 if (GNUNET_OK == ret)
852 GNUNET_CONTAINER_bloomfilter_add (filter, 852 {
853 &dm->key); 853 GNUNET_CONTAINER_bloomfilter_add (filter,
854 &dm->key);
855#if DEBUG_DATASTORE
856 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
857 "Successfully stored %u bytes under key `%s'\n",
858 size,
859 GNUNET_h2s (&dm->key));
860#endif
861 }
854 transmit_status (client, 862 transmit_status (client,
855 (GNUNET_SYSERR == ret) ? GNUNET_SYSERR : GNUNET_OK, 863 (GNUNET_SYSERR == ret) ? GNUNET_SYSERR : GNUNET_OK,
856 msg); 864 msg);
@@ -896,8 +904,9 @@ handle_get (void *cls,
896 /* don't bother database... */ 904 /* don't bother database... */
897#if DEBUG_DATASTORE 905#if DEBUG_DATASTORE
898 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 906 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
899 "Empty result set for `%s' request.\n", 907 "Empty result set for `%s' request for `%s'.\n",
900 "GET"); 908 "GET",
909 GNUNET_h2s (&msg->key));
901#endif 910#endif
902 GNUNET_SERVER_client_keep (client); 911 GNUNET_SERVER_client_keep (client);
903 transmit_item (client, 912 transmit_item (client,