diff options
author | jospaeth <spaethj@in.tum.de> | 2020-08-08 21:29:12 +0200 |
---|---|---|
committer | jospaeth <spaethj@in.tum.de> | 2020-08-08 21:29:12 +0200 |
commit | a2280bff1c996cfe70326602c0204f8637c2c20b (patch) | |
tree | 084bfa8c580b1470ffb0b43dfb6c3b895bd21fe8 /src/escrow/plugin_escrow_plaintext.c | |
parent | 7dc7d65cd35ac00c7495d81da4456b73c1928b11 (diff) | |
download | gnunet-a2280bff1c996cfe70326602c0204f8637c2c20b.tar.gz gnunet-a2280bff1c996cfe70326602c0204f8637c2c20b.zip |
store escrow status to config
Diffstat (limited to 'src/escrow/plugin_escrow_plaintext.c')
-rw-r--r-- | src/escrow/plugin_escrow_plaintext.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/escrow/plugin_escrow_plaintext.c b/src/escrow/plugin_escrow_plaintext.c index 7de922104..9406361d7 100644 --- a/src/escrow/plugin_escrow_plaintext.c +++ b/src/escrow/plugin_escrow_plaintext.c | |||
@@ -139,7 +139,7 @@ start_cont (void *cls) | |||
139 | */ | 139 | */ |
140 | struct ESCROW_PluginOperationWrapper * | 140 | struct ESCROW_PluginOperationWrapper * |
141 | start_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, | 141 | start_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, |
142 | const struct GNUNET_IDENTITY_Ego *ego, | 142 | struct GNUNET_IDENTITY_Ego *ego, |
143 | ESCROW_Plugin_Continuation cb, | 143 | ESCROW_Plugin_Continuation cb, |
144 | uint32_t op_id) | 144 | uint32_t op_id) |
145 | { | 145 | { |
@@ -184,6 +184,9 @@ start_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, | |||
184 | 184 | ||
185 | w->escrowAnchor = anchor; | 185 | w->escrowAnchor = anchor; |
186 | 186 | ||
187 | /* set the last escrow time */ | ||
188 | ESCROW_update_escrow_status (h, ego, "plaintext"); | ||
189 | |||
187 | p_op->sched_task = GNUNET_SCHEDULER_add_now (&start_cont, plugin_op_wrap); | 190 | p_op->sched_task = GNUNET_SCHEDULER_add_now (&start_cont, plugin_op_wrap); |
188 | return plugin_op_wrap; | 191 | return plugin_op_wrap; |
189 | } | 192 | } |
@@ -417,24 +420,14 @@ restore_plaintext_key_escrow (struct GNUNET_ESCROW_Handle *h, | |||
417 | * | 420 | * |
418 | * @param h the handle for the escrow component | 421 | * @param h the handle for the escrow component |
419 | * @param ego the identity ego of which the status has to be obtained | 422 | * @param ego the identity ego of which the status has to be obtained |
420 | * @param escrowAnchor the escrow anchor needed to restore the key | ||
421 | * | 423 | * |
422 | * @return the status of the escrow packed into a GNUNET_ESCROW_Status struct | 424 | * @return the status of the escrow packed into a GNUNET_ESCROW_Status struct |
423 | */ | 425 | */ |
424 | struct GNUNET_ESCROW_Status * | 426 | struct GNUNET_ESCROW_Status * |
425 | plaintext_get_status (struct GNUNET_ESCROW_Handle *h, | 427 | plaintext_get_status (struct GNUNET_ESCROW_Handle *h, |
426 | const struct GNUNET_IDENTITY_Ego *ego, | 428 | struct GNUNET_IDENTITY_Ego *ego) |
427 | struct GNUNET_ESCROW_Anchor *escrowAnchor) | ||
428 | { | 429 | { |
429 | struct GNUNET_ESCROW_Status *status; | 430 | return ESCROW_get_escrow_status (h, ego); |
430 | |||
431 | status = GNUNET_new (struct GNUNET_ESCROW_Status); | ||
432 | // TODO: get the correct time values | ||
433 | status->last_escrow_time = GNUNET_TIME_absolute_get (); | ||
434 | status->next_recommended_escrow_time = GNUNET_TIME_absolute_get (); | ||
435 | // END TODO | ||
436 | |||
437 | return status; | ||
438 | } | 431 | } |
439 | 432 | ||
440 | 433 | ||