aboutsummaryrefslogtreecommitdiff
path: root/src/escrow/escrow_plugin_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/escrow/escrow_plugin_helper.c')
-rw-r--r--src/escrow/escrow_plugin_helper.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/escrow/escrow_plugin_helper.c b/src/escrow/escrow_plugin_helper.c
index 3ed5ddabe..ca45b6837 100644
--- a/src/escrow/escrow_plugin_helper.c
+++ b/src/escrow/escrow_plugin_helper.c
@@ -262,8 +262,8 @@ ESCROW_update_escrow_status_verify (struct GNUNET_ESCROW_Handle *h,
262 262
263 config_section = get_config_section (ego); 263 config_section = get_config_section (ego);
264 264
265 // allocate enough space for "<plugin_name>_INTERVAL" 265 // allocate enough space for "<plugin_name>_VERIFY_INTERVAL"
266 config_option = GNUNET_malloc (strlen (plugin_name) + 9 + 1); 266 config_option = GNUNET_malloc (strlen (plugin_name) + 16 + 1);
267 plugin_name_upper = string_to_upper (plugin_name); 267 plugin_name_upper = string_to_upper (plugin_name);
268 sprintf (config_option, "%s_VERIFY_INTERVAL", plugin_name_upper); 268 sprintf (config_option, "%s_VERIFY_INTERVAL", plugin_name_upper);
269 269
@@ -354,16 +354,9 @@ ESCROW_get_escrow_status (struct GNUNET_ESCROW_Handle *h,
354{ 354{
355 struct GNUNET_ESCROW_Status *status; 355 struct GNUNET_ESCROW_Status *status;
356 unsigned long long conf_last_verification, conf_next_verification; 356 unsigned long long conf_last_verification, conf_next_verification;
357 struct GNUNET_CRYPTO_EcdsaPublicKey *pub; 357 char *config_section, *conf_escrow_method;
358 char *config_section, *pubkey_string, *conf_escrow_method;
359
360 pub = GNUNET_new (struct GNUNET_CRYPTO_EcdsaPublicKey);
361 GNUNET_IDENTITY_ego_get_public_key (ego, pub);
362 pubkey_string = GNUNET_CRYPTO_ecdsa_public_key_to_string (pub);
363 358
364 // allocate enough space for "escrow-PUBKEY" 359 config_section = get_config_section (ego);
365 config_section = GNUNET_malloc (7 + strlen (pubkey_string) + 1);
366 sprintf (config_section, "escrow-%s", pubkey_string);
367 360
368 status = GNUNET_new (struct GNUNET_ESCROW_Status); 361 status = GNUNET_new (struct GNUNET_ESCROW_Status);
369 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (h->cfg, 362 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number (h->cfg,
@@ -400,8 +393,6 @@ ESCROW_get_escrow_status (struct GNUNET_ESCROW_Handle *h,
400 status->last_method = GNUNET_ESCROW_method_string_to_number (conf_escrow_method); 393 status->last_method = GNUNET_ESCROW_method_string_to_number (conf_escrow_method);
401 394
402 GNUNET_free (config_section); 395 GNUNET_free (config_section);
403 GNUNET_free (pubkey_string);
404 GNUNET_free (pub);
405 if (NULL != conf_escrow_method) 396 if (NULL != conf_escrow_method)
406 GNUNET_free (conf_escrow_method); 397 GNUNET_free (conf_escrow_method);
407 398