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.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/escrow/escrow_plugin_helper.c b/src/escrow/escrow_plugin_helper.c
index f5f67d4bf..25648dfa1 100644
--- a/src/escrow/escrow_plugin_helper.c
+++ b/src/escrow/escrow_plugin_helper.c
@@ -75,7 +75,10 @@ ESCROW_list_ego (void *cls,
75 struct EgoEntry *ego_entry; 75 struct EgoEntry *ego_entry;
76 struct GNUNET_CRYPTO_EcdsaPublicKey pk; 76 struct GNUNET_CRYPTO_EcdsaPublicKey pk;
77 77
78 // TODO: error when this method is called at cleanup if init is not yet finished 78 /* don't add/change/delete egos when we are already cleaning up */
79 if (ESCROW_PLUGIN_STATE_CLEANUP == ph->state)
80 return;
81
79 if ((NULL == ego) && (ESCROW_PLUGIN_STATE_INIT == ph->state)) 82 if ((NULL == ego) && (ESCROW_PLUGIN_STATE_INIT == ph->state))
80 { 83 {
81 ph->state = ESCROW_PLUGIN_STATE_POST_INIT; 84 ph->state = ESCROW_PLUGIN_STATE_POST_INIT;
@@ -109,8 +112,9 @@ ESCROW_list_ego (void *cls,
109 GNUNET_free (ego_entry->identifier); 112 GNUNET_free (ego_entry->identifier);
110 ego_entry->identifier = GNUNET_strdup (identifier); 113 ego_entry->identifier = GNUNET_strdup (identifier);
111 /* TODO: this handles an edge case when the user restores an ego 114 /* TODO: this handles an edge case when the user restores an ego
112 that already exists. In that case, @param ego is the same for the 115 that already exists, i.e. with the same private key. In that case,
113 new as for the existing ego and this method thinks it is a rename. */ 116 @param ego is the same for the new as for the existing ego and this
117 method thinks it is a rename. */
114 if (NULL != ph->ego_create_cont) 118 if (NULL != ph->ego_create_cont)
115 ph->ego_create_cont (ego); 119 ph->ego_create_cont (ego);
116 break; 120 break;