commit ba53ae588fa870ac7db4aa06a36e8904cfbb8ae1
parent 4728063c34dd241a96ef91137598bbcab2fe584f
Author: Tellenbach Reto <tellr1@bfh.ch>
Date: Mon, 8 Jun 2026 13:57:21 +0200
[dbg] State-logic: Scan QR-code, timings
Diffstat:
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/taler-digitizer.c b/src/taler-digitizer.c
@@ -497,9 +497,7 @@ on_get_withdrawal_status_done(void *cls,
const struct TALER_BANK_WithdrawalResponse *vr)
{
TALER_LOG_DEBUG ("Callback of withdrawal/$WITHDRAWAL_ID\n");
- struct GNUNET_TIME_Relative delay;
struct GNUNET_SCHEDULER_Task *timeout_handle;
- delay = GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS,200);
timeout_handle = cls;
if(0 == strcasecmp("active", vr->details.ok.acc.status))
{
@@ -508,8 +506,9 @@ on_get_withdrawal_status_done(void *cls,
// give context for non terminal errors!
GNUNET_SCHEDULER_add_now(state_controller_task,NULL);
}
-
- GNUNET_SCHEDULER_add_delayed(delay,get_withdrawal_task,timeout_handle);
+ struct GNUNET_TIME_Relative poll;
+ poll = GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS,200);
+ GNUNET_SCHEDULER_add_delayed(poll,get_withdrawal_task,timeout_handle);
return;
}
@@ -1050,8 +1049,10 @@ static void ScanQR_state_task(void *cls)
struct GNUNET_SCHEDULER_Task *timeout_handle;
struct GNUNET_TIME_Relative delay;
+ struct GNUNET_TIME_Relative poll;
- delay = GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS,200);
+ delay = GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS,SCAN_QR_TIMEOUT_SECONDS);
+ poll = GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS,200);
timeout_handle = GNUNET_SCHEDULER_add_delayed(delay,timeout_task,NULL);
if(GNUNET_OK != run_qr_show(SCAN_QR_TIMEOUT_SECONDS))
{
@@ -1063,7 +1064,7 @@ static void ScanQR_state_task(void *cls)
//char *buf;
//GNUNET_asprintf(&buf,"%d",SCAN_QR_TIMEOUT_SECONDS*1000);
- GNUNET_SCHEDULER_add_delayed(delay,get_withdrawal_task,timeout_handle);
+ GNUNET_SCHEDULER_add_delayed(poll,get_withdrawal_task,timeout_handle);
return;
}