gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r9672 - in GNUnet/src/applications/fs: collection ecrs gap


From: gnunet
Subject: [GNUnet-SVN] r9672 - in GNUnet/src/applications/fs: collection ecrs gap
Date: Wed, 2 Dec 2009 19:36:45 +0100

Author: nevans
Date: 2009-12-02 19:36:45 +0100 (Wed, 02 Dec 2009)
New Revision: 9672

Modified:
   GNUnet/src/applications/fs/collection/collection.c
   GNUnet/src/applications/fs/ecrs/download.c
   GNUnet/src/applications/fs/gap/fs.c
   GNUnet/src/applications/fs/gap/querymanager.c
Log:
get rid of debugging messages and such

Modified: GNUnet/src/applications/fs/collection/collection.c
===================================================================
--- GNUnet/src/applications/fs/collection/collection.c  2009-12-02 18:20:14 UTC 
(rev 9671)
+++ GNUnet/src/applications/fs/collection/collection.c  2009-12-02 18:36:45 UTC 
(rev 9672)
@@ -520,9 +520,12 @@
                     GNUNET_OK == GNUNET_ECRS_directory_create (ectx,
                                                                &dirData,
                                                                &dirLen,
-                                                               
collectionData->file_count,
-                                                               
collectionData->files,
-                                                               
collectionData->meta));
+                                                               collectionData->
+                                                               file_count,
+                                                               collectionData->
+                                                               files,
+                                                               collectionData->
+                                                               meta));
   if (-1 == WRITE (fd, dirData, dirLen))
     {
       GNUNET_GE_LOG_STRERROR (ectx,

Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c  2009-12-02 18:20:14 UTC (rev 
9671)
+++ GNUnet/src/applications/fs/ecrs/download.c  2009-12-02 18:36:45 UTC (rev 
9672)
@@ -303,9 +303,11 @@
   struct GNUNET_ECRS_DownloadContext *rm = node->ctx;
 
   GNUNET_DLL_insert (rm->head, rm->tail, node);
+#if DEBUG_DOWNLOAD
   GNUNET_GE_LOG (rm->ectx,
                  GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_USER,
                  "in add_request, rm->have_target is %d\n", rm->have_target);
+#endif
   GNUNET_FS_start_search (rm->sctx,
                           rm->have_target == GNUNET_NO ? NULL : &rm->target,
                           GNUNET_ECRS_BLOCKTYPE_DATA, 1,

Modified: GNUnet/src/applications/fs/gap/fs.c
===================================================================
--- GNUnet/src/applications/fs/gap/fs.c 2009-12-02 18:20:14 UTC (rev 9671)
+++ GNUnet/src/applications/fs/gap/fs.c 2009-12-02 18:36:45 UTC (rev 9672)
@@ -519,8 +519,10 @@
          sizeof (CS_fs_request_search_MESSAGE)) / sizeof (GNUNET_HashCode);
   have_target =
     memcmp (&all_zeros, &rs->target, sizeof (GNUNET_PeerIdentity)) != 0;
+#if DEBUG_FS
   GNUNET_GE_LOG (ectx, GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_USER,
                  "in dv_fs, have_target is %d", have_target);
+#endif
 
   GNUNET_DV_FS_QUERYMANAGER_start_query (&rs->query[0], keyCount,
                                          anonymityLevel, type, sock,
@@ -774,27 +776,32 @@
   have_peer = dv_api->have_peer (sender);
   have_data = datastore->get (&req->queries[0], type, NULL, NULL);
   GNUNET_hash_to_enc (&req->queries[0], &enc);
+#if DEBUG_GAP
   GNUNET_GE_LOG (ectx,
                  GNUNET_GE_WARNING | GNUNET_GE_ADMIN | GNUNET_GE_USER |
                  GNUNET_GE_BULK,
                  "have_peer returned %d, get (%s) returned %d results for 
query type %d",
                  have_peer, (char *) &enc, have_data, type);
+#endif
   if ((dv_api->have_peer (sender) > 0)
       && (datastore->get (&req->queries[0], type, NULL, NULL) > 0))
     {
+#if DEBUG_GAP
       GNUNET_GE_LOG (ectx,
                      GNUNET_GE_WARNING | GNUNET_GE_ADMIN | GNUNET_GE_USER |
                      GNUNET_GE_BULK,
                      "We have the data, we know the return peer intimately 
(DV), so we will try and send results thataway!\n");
-
+#endif
       dv_cls = GNUNET_malloc (sizeof (struct DV_send_closure));
       dv_cls->message = (const P2P_gap_query_MESSAGE *) msg;
       dv_cls->request = NULL;   /* Not used for now... */
       result_count = datastore->get (&req->queries[0], type, &send_results_dv, 
dv_cls);
+#if DEBUG_GAP
       GNUNET_GE_LOG (ectx,
                      GNUNET_GE_WARNING | GNUNET_GE_ADMIN | GNUNET_GE_USER |
                      GNUNET_GE_BULK,
                      "Found %d results (in handle_p2p_query)\n", result_count);
+#endif
       GNUNET_free (dv_cls);
       GNUNET_mutex_unlock (GNUNET_FS_lock);
       return GNUNET_OK;
@@ -804,21 +811,23 @@
                get (&req->queries[0], GNUNET_ECRS_BLOCKTYPE_DATA, NULL,
                     NULL) > 0))
     {
+#if DEBUG_GAP
       GNUNET_GE_LOG (ectx,
                      GNUNET_GE_WARNING | GNUNET_GE_ADMIN | GNUNET_GE_USER |
                      GNUNET_GE_BULK,
                      "We have the data (blocktype_data), we know the return 
peer intimately (DV), so we will try and send results thataway!\n");
-
+#endif
       dv_cls = GNUNET_malloc (sizeof (struct DV_send_closure));
       dv_cls->message = (const P2P_gap_query_MESSAGE *) msg;
       dv_cls->request = NULL;   /* Not used for now... */
       result_count = datastore->get (&req->queries[0], 
GNUNET_ECRS_BLOCKTYPE_DATA,
                       &send_results_dv, dv_cls);
+#if DEBUG_GAP
       GNUNET_GE_LOG (ectx,
                      GNUNET_GE_WARNING | GNUNET_GE_ADMIN | GNUNET_GE_USER |
                      GNUNET_GE_BULK,
                      "Found %d results (in handle_p2p_query)\n", result_count);
-
+#endif
       GNUNET_free (dv_cls);
       GNUNET_mutex_unlock (GNUNET_FS_lock);
       return GNUNET_OK;
@@ -828,20 +837,23 @@
                get (&req->queries[0], GNUNET_ECRS_BLOCKTYPE_ANY, NULL,
                     NULL) > 0))
     {
+#if DEBUG_GAP
       GNUNET_GE_LOG (ectx,
                      GNUNET_GE_WARNING | GNUNET_GE_ADMIN | GNUNET_GE_USER |
                      GNUNET_GE_BULK,
                      "We have the data (blocktype_any), we know the return 
peer intimately (DV), so we will try and send results thataway!\n");
-
+#endif
       dv_cls = GNUNET_malloc (sizeof (struct DV_send_closure));
       dv_cls->message = (const P2P_gap_query_MESSAGE *) msg;
       dv_cls->request = NULL;   /* Not used for now... */
       result_count = datastore->get (&req->queries[0], 
GNUNET_ECRS_BLOCKTYPE_ANY,
                       &send_results_dv, dv_cls);
+#if DEBUG_GAP
       GNUNET_GE_LOG (ectx,
                            GNUNET_GE_WARNING | GNUNET_GE_ADMIN | 
GNUNET_GE_USER |
                            GNUNET_GE_BULK,
                            "Found %d results (in handle_p2p_query)\n", 
result_count);
+#endif
       GNUNET_free (dv_cls);
       GNUNET_mutex_unlock (GNUNET_FS_lock);
       return GNUNET_OK;

Modified: GNUnet/src/applications/fs/gap/querymanager.c
===================================================================
--- GNUnet/src/applications/fs/gap/querymanager.c       2009-12-02 18:20:14 UTC 
(rev 9671)
+++ GNUnet/src/applications/fs/gap/querymanager.c       2009-12-02 18:36:45 UTC 
(rev 9672)
@@ -40,6 +40,7 @@
 #include "shared.h"
 #include "gnunet_dv_service.h"
 
+#define DEBUG_QUERIES GNUNET_NO
 #define CHECK_REPEAT_FREQUENCY (150 * GNUNET_CRON_MILLISECONDS)
 
 /**
@@ -217,14 +218,6 @@
   struct ClientDataList *cl;
   struct RequestList *request;
 
-  GNUNET_GE_LOG (coreAPI->ectx,
-                 GNUNET_GE_WARNING | GNUNET_GE_ADMIN | GNUNET_GE_USER |
-                 GNUNET_GE_BULK,
-                 "entered GNUNET_DV_FS_QUERYMANAGER_start_query\n");
-  if (target == NULL)
-    GNUNET_GE_LOG (coreAPI->ectx,
-                   GNUNET_GE_WARNING | GNUNET_GE_ADMIN | GNUNET_GE_USER |
-                   GNUNET_GE_BULK, "target is null!\n");
   GNUNET_GE_ASSERT (NULL, key_count > 0);
   if (stats != NULL)
     {
@@ -281,10 +274,12 @@
   if ((anonymityLevel == 0) && (target != NULL)
       && (dv_api->have_peer (target)))
     {
+#if DEBUG_QUERIES
       GNUNET_GE_LOG (coreAPI->ectx,
                      GNUNET_GE_WARNING | GNUNET_GE_ADMIN | GNUNET_GE_USER |
                      GNUNET_GE_BULK,
                      "anonymity is zero, target non-null, and we know this 
peer.  Will attempt to send requests out over DV\n");
+#endif
       if (send_dv_query (request, target) > 0)
         {
           GNUNET_mutex_unlock (GNUNET_FS_lock);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]