#if DEBUG_DATASTORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Asked to put %u bytes of data\n",
- size);
+ "Asked to put %u bytes of data under key `%s'\n",
+ size,
+ GNUNET_h2s (key));
#endif
msize = sizeof(struct DataMessage) + size;
GNUNET_assert (msize <= GNUNET_SERVER_MAX_MESSAGE_SIZE);
{
struct GetMessage *gm;
+#if DEBUG_DATASTORE
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Asked to look for data under key `%s'\n",
+ GNUNET_h2s (key));
+#endif
gm = (struct GetMessage*) &h[1];
gm->header.type = htons(GNUNET_MESSAGE_TYPE_DATASTORE_GET);
gm->type = htonl(type);
GNUNET_TIME_absolute_ntoh(dm->expiration),
&msg);
if (GNUNET_OK == ret)
- GNUNET_CONTAINER_bloomfilter_add (filter,
- &dm->key);
+ {
+ GNUNET_CONTAINER_bloomfilter_add (filter,
+ &dm->key);
+#if DEBUG_DATASTORE
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Successfully stored %u bytes under key `%s'\n",
+ size,
+ GNUNET_h2s (&dm->key));
+#endif
+ }
transmit_status (client,
(GNUNET_SYSERR == ret) ? GNUNET_SYSERR : GNUNET_OK,
msg);
/* don't bother database... */
#if DEBUG_DATASTORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Empty result set for `%s' request.\n",
- "GET");
+ "Empty result set for `%s' request for `%s'.\n",
+ "GET",
+ GNUNET_h2s (&msg->key));
#endif
GNUNET_SERVER_client_keep (client);
transmit_item (client,