diff options
-rw-r--r-- | src/escrow/gnunet-escrow.c | 51 |
1 files changed, 18 insertions, 33 deletions
diff --git a/src/escrow/gnunet-escrow.c b/src/escrow/gnunet-escrow.c index 9b8b1a176..9fa219d2f 100644 --- a/src/escrow/gnunet-escrow.c +++ b/src/escrow/gnunet-escrow.c | |||
@@ -36,21 +36,6 @@ | |||
36 | static int ret; | 36 | static int ret; |
37 | 37 | ||
38 | /** | 38 | /** |
39 | * Plaintext method string | ||
40 | */ | ||
41 | static const char *plaintext_string = "plaintext"; | ||
42 | |||
43 | /** | ||
44 | * GNS method string | ||
45 | */ | ||
46 | static const char *gns_string = "gns"; | ||
47 | |||
48 | /** | ||
49 | * Anastasis method string | ||
50 | */ | ||
51 | static const char *anastasis_string = "anastasis"; | ||
52 | |||
53 | /** | ||
54 | * -P option | 39 | * -P option |
55 | */ | 40 | */ |
56 | static char *put_ego; | 41 | static char *put_ego; |
@@ -328,26 +313,26 @@ start_process () | |||
328 | escrow_status = GNUNET_ESCROW_get_status (escrow_handle, | 313 | escrow_status = GNUNET_ESCROW_get_status (escrow_handle, |
329 | ego, | 314 | ego, |
330 | method); | 315 | method); |
331 | // TODO: formatting/interpretation | 316 | |
332 | fprintf (stdout, "Last successful verification:\t%s\n", | 317 | if (GNUNET_ESCROW_KEY_NONE == escrow_status->last_method) |
333 | GNUNET_STRINGS_absolute_time_to_string (escrow_status->last_successful_verification_time)); | 318 | fprintf (stdout, "No escrow has been performed for identity %s!\n", ego->name); |
334 | fprintf (stdout, "Next recommended verification:\t%s\n", | 319 | else |
335 | GNUNET_STRINGS_absolute_time_to_string (escrow_status->next_recommended_verification_time)); | ||
336 | fprintf (stdout, "Last method:\t\t\t"); | ||
337 | switch (escrow_status->last_method) | ||
338 | { | 320 | { |
339 | case GNUNET_ESCROW_KEY_PLAINTEXT: | 321 | fprintf (stdout, "Escrow STATUS information for identity %s\n", ego->name); |
340 | fprintf (stdout, "%s\n", plaintext_string); | 322 | fprintf (stdout, "=======================================================\n"); |
341 | break; | 323 | if (0 == escrow_status->last_successful_verification_time.abs_value_us) |
342 | case GNUNET_ESCROW_KEY_GNS: | 324 | fprintf (stdout, "No successful verification! Please VERIFY now.\n"); |
343 | fprintf (stdout, "%s\n", gns_string); | 325 | else |
344 | break; | 326 | { |
345 | case GNUNET_ESCROW_KEY_ANASTASIS: | 327 | fprintf (stdout, "Last successful verification:\t%s\n", |
346 | fprintf (stdout, "%s\n", anastasis_string); | 328 | GNUNET_STRINGS_absolute_time_to_string (escrow_status->last_successful_verification_time)); |
347 | break; | 329 | fprintf (stdout, "Next recommended verification:\t%s\n", |
348 | default: // GNUNET_ESCROW_KEY_NONE | 330 | GNUNET_STRINGS_absolute_time_to_string (escrow_status->next_recommended_verification_time)); |
349 | fprintf (stdout, "INVALID METHOD\n"); | 331 | } |
332 | fprintf (stdout, "Last method:\t\t\t%s\n", | ||
333 | GNUNET_ESCROW_method_number_to_string (escrow_status->last_method)); | ||
350 | } | 334 | } |
335 | |||
351 | cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL); | 336 | cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup, NULL); |
352 | return; | 337 | return; |
353 | } | 338 | } |