gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated (174c0ad98 -> 4280ed184)


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated (174c0ad98 -> 4280ed184)
Date: Thu, 13 Dec 2018 15:54:29 +0100

This is an automated email from the git hooks/post-receive script.

julius-buenger pushed a change to branch master
in repository gnunet.

    from 174c0ad98 fix #5500
     new 0deab80a2 Update POTFILES
     new 620b0f300 RPS service: Reduce logging
     new 37f806bed RPS service: Assure map with exists before using
     new 4280ed184 RPS sampler: Stop logging to file

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 po/POTFILES.in                            |  3 ++-
 src/rps/gnunet-service-rps.c              | 14 ++++--------
 src/rps/gnunet-service-rps_sampler.c      |  9 --------
 src/rps/gnunet-service-rps_sampler_elem.c | 36 -------------------------------
 src/rps/rps-sampler_client.c              |  9 --------
 src/rps/rps-sampler_common.c              | 25 ---------------------
 src/rps/rps-sampler_common.h              |  6 ------
 7 files changed, 6 insertions(+), 96 deletions(-)

diff --git a/po/POTFILES.in b/po/POTFILES.in
index a7d35588f..57160115c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -4,6 +4,8 @@ src/arm/arm_monitor_api.c
 src/arm/gnunet-arm.c
 src/arm/gnunet-service-arm.c
 src/arm/mockup-service.c
+src/ats/ats_api2_application.c
+src/ats/ats_api2_transport.c
 src/ats/ats_api_connectivity.c
 src/ats/ats_api_performance.c
 src/ats/ats_api_scanner.c
@@ -285,7 +287,6 @@ src/reclaim-attribute/plugin_reclaim_attribute_gnuid.c
 src/reclaim-attribute/reclaim_attribute.c
 src/reclaim/gnunet-reclaim.c
 src/reclaim/gnunet-service-reclaim.c
-src/reclaim/jwt.c
 src/reclaim/plugin_gnsrecord_reclaim.c
 src/reclaim/plugin_reclaim_sqlite.c
 src/reclaim/reclaim_api.c
diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c
index f121db5b8..0c333c4f1 100644
--- a/src/rps/gnunet-service-rps.c
+++ b/src/rps/gnunet-service-rps.c
@@ -2947,10 +2947,6 @@ destroy_sub (struct Sub *sub)
   {
     char push_recv_str_tmp[8];
     (void) snprintf (push_recv_str_tmp, 8, "%" PRIu32 "\n", sub->push_recv[i]);
-    LOG (GNUNET_ERROR_TYPE_DEBUG,
-         "Adding str `%s' to `%s'\n",
-         push_recv_str_tmp,
-         push_recv_str);
     (void) strncat (push_recv_str,
                     push_recv_str_tmp,
                     1535 - strnlen (push_recv_str, 1536));
@@ -2968,10 +2964,6 @@ destroy_sub (struct Sub *sub)
   {
     char pull_delays_str_tmp[8];
     (void) snprintf (pull_delays_str_tmp, 8, "%" PRIu32 "\n", 
sub->pull_delays[i]);
-    LOG (GNUNET_ERROR_TYPE_DEBUG,
-         "Adding str `%s' to `%s'\n",
-         pull_delays_str_tmp,
-         pull_delays_str);
     (void) strncat (pull_delays_str,
                     pull_delays_str_tmp,
                     1535 - strnlen (pull_delays_str, 1536));
@@ -3507,7 +3499,8 @@ handle_peer_pull_request (void *cls,
                              "# pull request message received",
                              1,
                              GNUNET_NO);
-    if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (map_single_hop,
+    if (NULL != map_single_hop &&
+        GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (map_single_hop,
                                                              
&peer_ctx->peer_id))
     {
       GNUNET_STATISTICS_update (stats,
@@ -3778,7 +3771,8 @@ send_pull_request (struct PeerContext *peer_ctx)
                               "# pull request send issued",
                               1,
                               GNUNET_NO);
-    if (GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (map_single_hop,
+    if (NULL != map_single_hop &&
+        GNUNET_NO == GNUNET_CONTAINER_multipeermap_contains (map_single_hop,
                                                              
&peer_ctx->peer_id))
     {
       GNUNET_STATISTICS_update (stats,
diff --git a/src/rps/gnunet-service-rps_sampler.c 
b/src/rps/gnunet-service-rps_sampler.c
index dcfef19c6..d3abfa67f 100644
--- a/src/rps/gnunet-service-rps_sampler.c
+++ b/src/rps/gnunet-service-rps_sampler.c
@@ -202,15 +202,6 @@ RPS_sampler_init (size_t init_size,
 
   sampler = GNUNET_new (struct RPS_Sampler);
 
-  #ifdef TO_FILE
-  sampler->file_name = create_file ("sampler-");
-  GNUNET_assert (NULL != sampler->file_name);
-
-  LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Initialised sampler %s\n",
-       sampler->file_name);
-  #endif /* TO_FILE */
-
   sampler->max_round_interval = max_round_interval;
   sampler->get_peers = sampler_get_rand_peer;
   //sampler->sampler_elements = GNUNET_new_array(init_size, struct 
GNUNET_PeerIdentity);
diff --git a/src/rps/gnunet-service-rps_sampler_elem.c 
b/src/rps/gnunet-service-rps_sampler_elem.c
index a1a46b2d7..f0c112ac7 100644
--- a/src/rps/gnunet-service-rps_sampler_elem.c
+++ b/src/rps/gnunet-service-rps_sampler_elem.c
@@ -54,15 +54,6 @@ RPS_sampler_elem_reinit (struct RPS_SamplerElement 
*sampler_elem)
                              &(sampler_elem->auth_key.key),
                              GNUNET_CRYPTO_HASH_LENGTH);
 
-  #ifdef TO_FILE
-  /* Create a file(-name) to store internals to */
-  char *name_buf;
-  name_buf = auth_key_to_string (sampler_elem->auth_key);
-
-  sampler_elem->file_name = create_file (name_buf);
-  GNUNET_free (name_buf);
-  #endif /* TO_FILE */
-
   sampler_elem->last_client_request = GNUNET_TIME_UNIT_FOREVER_ABS;
 
   sampler_elem->birth = GNUNET_TIME_absolute_get ();
@@ -100,12 +91,6 @@ RPS_sampler_elem_create (void)
 void
 RPS_sampler_elem_destroy (struct RPS_SamplerElement *sampler_elem)
 {
-  #ifdef TO_FILE
-  if (NULL != sampler_elem->file_name)
-  {
-    GNUNET_free (sampler_elem->file_name);
-  }
-  #endif /* TO_FILE */
   GNUNET_free (sampler_elem);
 }
 
@@ -124,12 +109,6 @@ RPS_sampler_elem_next (struct RPS_SamplerElement 
*sampler_elem,
 
   sampler_elem->num_peers++;
 
-  #ifdef TO_FILE
-  to_file (sampler_elem->file_name,
-           "Got id %s",
-           GNUNET_i2s_full (new_ID));
-  #endif /* TO_FILE */
-
   if (0 == GNUNET_CRYPTO_cmp_peer_identity (new_ID, &(sampler_elem->peer_id)))
   {
     LOG (GNUNET_ERROR_TYPE_DEBUG, "Have already PeerID %s\n",
@@ -168,12 +147,6 @@ RPS_sampler_elem_next (struct RPS_SamplerElement 
*sampler_elem,
     }
   }
   sampler_elem->is_empty = NOT_EMPTY;
-
-  #ifdef TO_FILE
-  to_file (sampler_elem->file_name,
-           "Now holding %s",
-           GNUNET_i2s_full (&sampler_elem->peer_id));
-  #endif /* TO_FILE */
 }
 
 /**
@@ -187,15 +160,6 @@ RPS_sampler_elem_set (struct RPS_SamplerElement 
*sampler_elem,
                       struct GNUNET_CRYPTO_AuthKey auth_key)
 {
   sampler_elem->auth_key = auth_key;
-
-  #ifdef TO_FILE
-  /* Create a file(-name) to store internals to */
-  char *name_buf;
-  name_buf = auth_key_to_string (sampler_elem->auth_key);
-
-  sampler_elem->file_name = create_file (name_buf);
-  GNUNET_free (name_buf);
-  #endif /* TO_FILE */
 }
 
 /* end of gnunet-service-rps.c */
diff --git a/src/rps/rps-sampler_client.c b/src/rps/rps-sampler_client.c
index fea824cf3..7b6094b0c 100644
--- a/src/rps/rps-sampler_client.c
+++ b/src/rps/rps-sampler_client.c
@@ -210,15 +210,6 @@ RPS_sampler_mod_init (size_t init_size,
 
   //GNUNET_assert (init_size == sampler->sampler_size);
 
-#ifdef TO_FILE
-  sampler->file_name = create_file ("sampler-");
-
-  LOG (GNUNET_ERROR_TYPE_DEBUG,
-       "Initialised modified sampler %s\n",
-       sampler->file_name);
-  to_file (sampler->file_name,
-           "This is a modified sampler");
-#endif /* TO_FILE */
   RPS_sampler_resize (sampler, init_size);
 
   return sampler;
diff --git a/src/rps/rps-sampler_common.c b/src/rps/rps-sampler_common.c
index 5dbb5315a..60d2d5ed5 100644
--- a/src/rps/rps-sampler_common.c
+++ b/src/rps/rps-sampler_common.c
@@ -199,10 +199,6 @@ notify_update (struct RPS_Sampler *sampler)
 RPS_sampler_update (struct RPS_Sampler *sampler,
                     const struct GNUNET_PeerIdentity *id)
 {
-  to_file (sampler->file_name,
-           "Got %s",
-           GNUNET_i2s_full (id));
-
   for (uint32_t i = 0; i < sampler->sampler_size; i++)
   {
     RPS_sampler_elem_next (sampler->sampler_elements[i],
@@ -232,8 +228,6 @@ RPS_sampler_reinitialise_by_value (struct RPS_Sampler 
*sampler,
           &(sampler->sampler_elements[i]->peer_id)) )
     {
       LOG (GNUNET_ERROR_TYPE_DEBUG, "Reinitialising sampler\n");
-      to_file (sampler->sampler_elements[i]->file_name,
-               "--- non-active");
       RPS_sampler_elem_reinit (sampler->sampler_elements[i]);
     }
   }
@@ -290,17 +284,8 @@ sampler_resize (struct RPS_Sampler *sampler, unsigned int 
new_size)
          old_size,
          new_size);
 
-    to_file (sampler->file_name,
-         "Shrinking sampler %d -> %d",
-         old_size,
-         new_size);
-
     for (i = new_size ; i < old_size ; i++)
     {
-      to_file (sampler->file_name,
-               "-%" PRIu32 ": %s",
-               i,
-               sampler->sampler_elements[i]->file_name);
       RPS_sampler_elem_destroy (sampler->sampler_elements[i]);
     }
 
@@ -319,11 +304,6 @@ sampler_resize (struct RPS_Sampler *sampler, unsigned int 
new_size)
          old_size,
          new_size);
 
-    to_file (sampler->file_name,
-         "Growing sampler %d -> %d",
-         old_size,
-         new_size);
-
     GNUNET_array_grow (sampler->sampler_elements,
         sampler->sampler_size,
         new_size);
@@ -331,11 +311,6 @@ sampler_resize (struct RPS_Sampler *sampler, unsigned int 
new_size)
     for (i = old_size ; i < new_size ; i++)
     { /* Add new sampler elements */
       sampler->sampler_elements[i] = RPS_sampler_elem_create ();
-
-      to_file (sampler->file_name,
-               "+%" PRIu32 ": %s",
-               i,
-               sampler->sampler_elements[i]->file_name);
     }
   }
   else
diff --git a/src/rps/rps-sampler_common.h b/src/rps/rps-sampler_common.h
index 68f5865a9..a9a079aff 100644
--- a/src/rps/rps-sampler_common.h
+++ b/src/rps/rps-sampler_common.h
@@ -158,12 +158,6 @@ struct RPS_Sampler
 
   struct SamplerNotifyUpdateCTX *notify_ctx_head;
   struct SamplerNotifyUpdateCTX *notify_ctx_tail;
-  #ifdef TO_FILE
-  /**
-   * File name to log to
-   */
-  char *file_name;
-  #endif /* TO_FILE */
 };
 
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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