summaryrefslogtreecommitdiff
path: root/src/sync
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-14 16:42:26 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-14 16:42:26 +0100
commitef1b5a7e9ee352ad4acf5a7e97099740ec16a9a6 (patch)
treef7a7dfea3d916b24237001868ffbb2479ed68166 /src/sync
parent19574ffde49e956ae3fd5f9739993b635e5ac92b (diff)
downloadsync-ef1b5a7e9ee352ad4acf5a7e97099740ec16a9a6.tar.gz
sync-ef1b5a7e9ee352ad4acf5a7e97099740ec16a9a6.tar.bz2
sync-ef1b5a7e9ee352ad4acf5a7e97099740ec16a9a6.zip
adapt to new timestamp format
Diffstat (limited to 'src/sync')
-rw-r--r--src/sync/sync-httpd_backup_post.c8
-rw-r--r--src/sync/sync-httpd_config.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/sync/sync-httpd_backup_post.c b/src/sync/sync-httpd_backup_post.c
index 962142d..a895305 100644
--- a/src/sync/sync-httpd_backup_post.c
+++ b/src/sync/sync-httpd_backup_post.c
@@ -127,7 +127,7 @@ struct BackupContext
* Timestamp of the order in @e existing_order_id. Used to
* select the most recent unpaid offer.
*/
- struct GNUNET_TIME_Absolute existing_order_timestamp;
+ struct GNUNET_TIME_Timestamp existing_order_timestamp;
/**
* Expected total upload size.
@@ -371,7 +371,7 @@ proposal_cb (void *cls,
*/
static void
ongoing_payment_cb (void *cls,
- struct GNUNET_TIME_Absolute timestamp,
+ struct GNUNET_TIME_Timestamp timestamp,
const char *order_id,
const struct TALER_ClaimTokenP *token,
const struct TALER_Amount *amount)
@@ -383,7 +383,9 @@ ongoing_payment_cb (void *cls,
&SH_annual_fee))
return; /* can't re-use, fees changed */
if ( (NULL == bc->existing_order_id) ||
- (bc->existing_order_timestamp.abs_value_us < timestamp.abs_value_us) )
+ (GNUNET_TIME_timestamp_cmp (bc->existing_order_timestamp,
+ (<),
+ timestamp)) )
{
GNUNET_free (bc->existing_order_id);
bc->existing_order_id = GNUNET_strdup (order_id);
diff --git a/src/sync/sync-httpd_config.c b/src/sync/sync-httpd_config.c
index b75c1d5..f8a0b17 100644
--- a/src/sync/sync-httpd_config.c
+++ b/src/sync/sync-httpd_config.c
@@ -61,7 +61,7 @@ SH_handler_config (struct SH_RequestHandler *rh,
TALER_JSON_pack_amount ("annual_fee",
&SH_annual_fee),
GNUNET_JSON_pack_string ("version",
- "1:0:1"));
+ "2:0:0"));
}