gnunet

Main GNUnet Logic
Log | Files | Refs | Submodules | README | LICENSE

commit 12d0ad4a9c2adc3c36cc2fc34c973cc4f5e4c5cf
parent 4a531f431f0d404dcfd32993f4c498d3303e3d94
Author: Julius Bünger <buenger@mytum.de>
Date:   Sat, 27 Dec 2014 12:31:51 +0000

reading alpha, beta from .conf

Diffstat:
Msrc/rps/gnunet-service-rps.c | 33+++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c @@ -1492,24 +1492,25 @@ run (void *cls, beta = 0.45; // TODO initialise thresholds - ? - ///* Get alpha from the configuration */ - //if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_float (cfg, "RPS", - // "ALPHA", - // &alpha)) - //{ - // LOG(GNUNET_ERROR_TYPE_DEBUG, "No ALPHA specified in the config\n"); - //} - //LOG(GNUNET_ERROR_TYPE_DEBUG, "ALPHA is %f\n", alpha); + /* Get alpha from the configuration */ + if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_float (cfg, "RPS", + "ALPHA", + &alpha)) + { + LOG(GNUNET_ERROR_TYPE_DEBUG, "No ALPHA specified in the config\n"); + } + LOG(GNUNET_ERROR_TYPE_DEBUG, "ALPHA is %f\n", alpha); - ///* Get beta from the configuration */ - //if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_float (cfg, "RPS", - // "BETA", - // &beta)) - //{ - // LOG(GNUNET_ERROR_TYPE_DEBUG, "No BETA specified in the config\n"); - //} - //LOG(GNUNET_ERROR_TYPE_DEBUG, "BETA is %f\n", beta); + /* Get beta from the configuration */ + if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_float (cfg, "RPS", + "BETA", + &beta)) + { + LOG(GNUNET_ERROR_TYPE_DEBUG, "No BETA specified in the config\n"); + } + LOG(GNUNET_ERROR_TYPE_DEBUG, "BETA is %f\n", beta); + // TODO check that alpha + beta < 1 peer_map = GNUNET_CONTAINER_multipeermap_create(est_size, GNUNET_NO);