diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-12-14 19:53:29 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-12-14 19:53:34 +0100 |
commit | a398d5ee9672e6d773cccae03513a812b7230cd2 (patch) | |
tree | 85d83ad3dea55b0402168dda2d22ed393cc8b11d /src/anastasis/anastasis-gtk_action.c | |
parent | 6cbfc3b9b5b91fe903e8b22e5bab59ae9d8ad7ab (diff) | |
download | anastasis-gtk-a398d5ee9672e6d773cccae03513a812b7230cd2.tar.gz anastasis-gtk-a398d5ee9672e6d773cccae03513a812b7230cd2.tar.bz2 anastasis-gtk-a398d5ee9672e6d773cccae03513a812b7230cd2.zip |
-fix FTBFS for Taler protocol v11
Diffstat (limited to 'src/anastasis/anastasis-gtk_action.c')
-rw-r--r-- | src/anastasis/anastasis-gtk_action.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/anastasis/anastasis-gtk_action.c b/src/anastasis/anastasis-gtk_action.c index 79b7f3d..823f5f6 100644 --- a/src/anastasis/anastasis-gtk_action.c +++ b/src/anastasis/anastasis-gtk_action.c @@ -1145,10 +1145,10 @@ update_entry (const char *name, static void action_secret_editing (void) { - struct GNUNET_TIME_Absolute exp_time; + struct GNUNET_TIME_Timestamp exp_time; struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_absolute_time ("expiration", - &exp_time), + GNUNET_JSON_spec_timestamp ("expiration", + &exp_time), GNUNET_JSON_spec_end () }; struct tm tv; @@ -1168,7 +1168,7 @@ action_secret_editing (void) { time_t t; - t = exp_time.abs_value_us / GNUNET_TIME_UNIT_SECONDS.rel_value_us; + t = exp_time.abs_time.abs_value_us / GNUNET_TIME_UNIT_SECONDS.rel_value_us; GNUNET_assert (NULL != localtime_r (&t, &tv)); @@ -1587,7 +1587,7 @@ action_backup_finished (void) json_t *se; const char *url; GtkListStore *ls; - struct GNUNET_TIME_Absolute mexp; + struct GNUNET_TIME_Timestamp mexp; AG_hide_all_frames (); det = json_object_get (AG_redux_state, @@ -1595,16 +1595,16 @@ action_backup_finished (void) ls = GTK_LIST_STORE (GCG_get_main_window_object ( "backup_provider_liststore")); gtk_list_store_clear (ls); - mexp = GNUNET_TIME_UNIT_FOREVER_ABS; + mexp = GNUNET_TIME_UNIT_FOREVER_TS; json_object_foreach (det, url, se) { - struct GNUNET_TIME_Absolute pexp; + struct GNUNET_TIME_Timestamp pexp; uint64_t version; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_uint64 ("policy_version", &version), - GNUNET_JSON_spec_absolute_time ("policy_expiration", - &pexp), + GNUNET_JSON_spec_timestamp ("policy_expiration", + &pexp), GNUNET_JSON_spec_end () }; @@ -1617,8 +1617,8 @@ action_backup_finished (void) AG_error ("State did not parse correctly"); return; } - mexp = GNUNET_TIME_absolute_min (mexp, - pexp); + mexp = GNUNET_TIME_timestamp_min (mexp, + pexp); gtk_list_store_insert_with_values ( ls, NULL, @@ -1628,7 +1628,7 @@ action_backup_finished (void) AG_BPC_BACKUP_VERSION, (guint64) version, AG_BPC_EXPIRATION_TIME_STR, - GNUNET_STRINGS_absolute_time_to_string (pexp), + GNUNET_TIME_timestamp2s (pexp), AG_BPC_SUCCESS_FLAG, true, AG_BPC_PROVIDER_NAME, @@ -1639,11 +1639,12 @@ action_backup_finished (void) struct tm tv; char estr[128]; time_t t; + struct GNUNET_TIME_Absolute sexp; /* be more conservative in what we show */ - mexp = GNUNET_TIME_absolute_subtract (mexp, + sexp = GNUNET_TIME_absolute_subtract (mexp.abs_time, GNUNET_TIME_UNIT_DAYS); - t = mexp.abs_value_us / GNUNET_TIME_UNIT_SECONDS.rel_value_us; + t = sexp.abs_value_us / GNUNET_TIME_UNIT_SECONDS.rel_value_us; GNUNET_assert (NULL != localtime_r (&t, &tv)); @@ -1653,7 +1654,7 @@ action_backup_finished (void) "%d %B %Y", &tv)); update_label ("backup_expiration_date_label", - GNUNET_STRINGS_absolute_time_to_string (mexp)); + GNUNET_TIME_absolute2s (sexp)); } AG_hide ("anastasis_gtk_progress_vbox"); AG_hide ("anastasis_gtk_backup_progress_scrolled_window"); |