gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] 02/03: RPS sampler: Fix creation of sampler


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 02/03: RPS sampler: Fix creation of sampler
Date: Wed, 28 Nov 2018 00:03:03 +0100

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

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

commit a3b65a1c9b2665c877ed0b066994693b94e941cf
Author: Julius Bünger <address@hidden>
AuthorDate: Wed Nov 28 00:01:16 2018 +0100

    RPS sampler: Fix creation of sampler
---
 src/rps/gnunet-service-rps_sampler.c | 1 +
 src/rps/rps-sampler_client.c         | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/rps/gnunet-service-rps_sampler.c 
b/src/rps/gnunet-service-rps_sampler.c
index 9629a29a1..dcfef19c6 100644
--- a/src/rps/gnunet-service-rps_sampler.c
+++ b/src/rps/gnunet-service-rps_sampler.c
@@ -204,6 +204,7 @@ RPS_sampler_init (size_t init_size,
 
   #ifdef TO_FILE
   sampler->file_name = create_file ("sampler-");
+  GNUNET_assert (NULL != sampler->file_name);
 
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Initialised sampler %s\n",
diff --git a/src/rps/rps-sampler_client.c b/src/rps/rps-sampler_client.c
index 4904b9d43..fea824cf3 100644
--- a/src/rps/rps-sampler_client.c
+++ b/src/rps/rps-sampler_client.c
@@ -205,7 +205,6 @@ RPS_sampler_mod_init (size_t init_size,
   sampler->get_peers = sampler_mod_get_rand_peer;
   //sampler->sampler_elements = GNUNET_new_array(init_size, struct 
GNUNET_PeerIdentity);
   //GNUNET_array_grow (sampler->sampler_elements, sampler->sampler_size, 
min_size);
-  RPS_sampler_resize (sampler, init_size);
 
   client_get_index = 0;
 
@@ -220,6 +219,7 @@ RPS_sampler_mod_init (size_t init_size,
   to_file (sampler->file_name,
            "This is a modified sampler");
 #endif /* TO_FILE */
+  RPS_sampler_resize (sampler, init_size);
 
   return sampler;
 }

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



reply via email to

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