diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2021-04-21 12:34:56 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2021-04-21 12:34:56 +0200 |
commit | dfe86f94252a403b8d2ce12fb2862712d4b7fbdd (patch) | |
tree | a662c43987d9172e421a0f9e0db849370498899e /src/reclaim | |
parent | 6c1b06b0629b146981fcdfb5ecea40bbc6450a9e (diff) | |
download | gnunet-dfe86f94252a403b8d2ce12fb2862712d4b7fbdd.tar.gz gnunet-dfe86f94252a403b8d2ce12fb2862712d4b7fbdd.zip |
-fix expiration in us
Diffstat (limited to 'src/reclaim')
-rw-r--r-- | src/reclaim/plugin_reclaim_credential_pabc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/reclaim/plugin_reclaim_credential_pabc.c b/src/reclaim/plugin_reclaim_credential_pabc.c index ff04624a4..47f9a9384 100644 --- a/src/reclaim/plugin_reclaim_credential_pabc.c +++ b/src/reclaim/plugin_reclaim_credential_pabc.c | |||
@@ -297,7 +297,7 @@ pabc_get_expiration (void *cls, | |||
297 | size_t data_size, | 297 | size_t data_size, |
298 | struct GNUNET_TIME_Absolute *exp) | 298 | struct GNUNET_TIME_Absolute *exp) |
299 | { | 299 | { |
300 | uint32_t exp_i; | 300 | uint64_t exp_i; |
301 | char *exp_str; | 301 | char *exp_str; |
302 | 302 | ||
303 | if (PABC_OK != pabc_cred_get_attr_by_name_from_cred (data, | 303 | if (PABC_OK != pabc_cred_get_attr_by_name_from_cred (data, |
@@ -309,13 +309,18 @@ pabc_get_expiration (void *cls, | |||
309 | return GNUNET_SYSERR; | 309 | return GNUNET_SYSERR; |
310 | } | 310 | } |
311 | 311 | ||
312 | if (1 != sscanf (exp_str, "%u", &exp_i)) | 312 | if (1 != sscanf (exp_str, "%llu", &exp_i)) |
313 | { | 313 | { |
314 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 314 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
315 | "Invalid expiration `%s'\n", exp_str); | 315 | "Invalid expiration `%s'\n", exp_str); |
316 | GNUNET_free (exp_str); | 316 | GNUNET_free (exp_str); |
317 | return GNUNET_SYSERR; | 317 | return GNUNET_SYSERR; |
318 | } | 318 | } |
319 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
320 | "Converted expiration string `%s' to %llu", | ||
321 | exp_str, exp_i); | ||
322 | |||
323 | GNUNET_free (exp_str); | ||
319 | exp->abs_value_us = exp_i * 1000 * 1000; | 324 | exp->abs_value_us = exp_i * 1000 * 1000; |
320 | return GNUNET_OK; | 325 | return GNUNET_OK; |
321 | } | 326 | } |