log drop
authorChristian Grothoff <christian@grothoff.org>
Tue, 19 Oct 2010 11:52:42 +0000 (11:52 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 19 Oct 2010 11:52:42 +0000 (11:52 +0000)
src/datastore/datastore.h
src/datastore/datastore_api.c

index 55ca7c8e5c7e9c2a4f4dbdb425ae3ddd3d971877..8fa0ca0446559539416e4a2ffaa8aa4f6ecc4503 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef DATASTORE_H
 #define DATASTORE_H
 
-#define DEBUG_DATASTORE GNUNET_YES
+#define DEBUG_DATASTORE GNUNET_NO
 
 #include "gnunet_util_lib.h"
 
index e0c184a5777ecdec7d93b159752a22b357615674..58340ed6cfb13a436ff764fc619d30849baa5b30 100644 (file)
@@ -1090,6 +1090,13 @@ process_result_message (void *cls,
                      _("Failed to receive response from database.\n"));
          do_disconnect (h);
        }
+      else
+       {
+#if DEBUG_DATASTORE
+         GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                     "Request dropped due to finite datastore queue length.\n");
+#endif
+       }
       if (rc.iter != NULL)
        rc.iter (rc.iter_cls,
                 NULL, 0, NULL, 0, 0, 0, 
@@ -1307,7 +1314,14 @@ GNUNET_DATASTORE_get (struct GNUNET_DATASTORE_Handle *h,
                         queue_priority, max_queue_size, timeout,
                         &process_result_message, &qc);
   if (qe == NULL)
-    return NULL;
+    {
+#if DEBUG_DATASTORE
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                 "Could not queue request for `%s'\n",
+                 GNUNET_h2s (key));
+#endif
+      return NULL;
+    }
   gm = (struct GetMessage*) &qe[1];
   gm->header.type = htons(GNUNET_MESSAGE_TYPE_DATASTORE_GET);
   gm->type = htonl(type);