diff options
author | jospaeth <spaethj@in.tum.de> | 2020-09-04 20:02:39 +0200 |
---|---|---|
committer | jospaeth <spaethj@in.tum.de> | 2020-09-04 20:02:39 +0200 |
commit | 5e5c582c8338b9e231ea9c2f70d5bc83bd531496 (patch) | |
tree | 7bf4827f56de39e68412f16ce8d0d5de2a582707 /src/escrow/escrow_plugin_helper.c | |
parent | c6fd8f93675ef986184c9a93183e3d7767a4b8ed (diff) | |
download | gnunet-5e5c582c8338b9e231ea9c2f70d5bc83bd531496.tar.gz gnunet-5e5c582c8338b9e231ea9c2f70d5bc83bd531496.zip |
don't maintain a plugin's ego list when cleaning up
Diffstat (limited to 'src/escrow/escrow_plugin_helper.c')
-rw-r--r-- | src/escrow/escrow_plugin_helper.c | 10 |
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; |