gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-anastasis] branch master updated: -fix potential tt double-schedu


From: gnunet
Subject: [taler-anastasis] branch master updated: -fix potential tt double-scheduling
Date: Mon, 11 Jul 2022 14:42:29 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 2942cbd  -fix potential tt double-scheduling
2942cbd is described below

commit 2942cbd1ba4e2f647e40a9ec6daea48550702255
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Jul 11 14:42:27 2022 +0200

    -fix potential tt double-scheduling
---
 src/reducer/anastasis_api_redux.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/reducer/anastasis_api_redux.c 
b/src/reducer/anastasis_api_redux.c
index 36386de..0535883 100644
--- a/src/reducer/anastasis_api_redux.c
+++ b/src/reducer/anastasis_api_redux.c
@@ -663,6 +663,8 @@ config_cb (void *cls,
   if (MHD_HTTP_OK != http_status)
   {
     cr->backoff = GNUNET_TIME_STD_BACKOFF (cr->backoff);
+    GNUNET_assert (NULL == cr->tt);
+    GNUNET_assert (NULL != cr->url);
     cr->tt = GNUNET_SCHEDULER_add_delayed (cr->backoff,
                                            &retry_config,
                                            cr);
@@ -690,6 +692,8 @@ config_request_timeout (void *cls)
   cr->ec = TALER_EC_GENERIC_TIMEOUT;
   notify_waiting (cr);
   cr->backoff = GNUNET_TIME_STD_BACKOFF (cr->backoff);
+  GNUNET_assert (NULL == cr->tt);
+  GNUNET_assert (NULL != cr->url);
   cr->tt = GNUNET_SCHEDULER_add_delayed (cr->backoff,
                                          &retry_config,
                                          cr);
@@ -708,6 +712,7 @@ retry_config (void *cls)
     cr->co = NULL;
   }
   cr->timeout_at = GNUNET_TIME_relative_to_absolute (CONFIG_GENERIC_TIMEOUT);
+  GNUNET_assert (NULL == cr->tt);
   cr->tt = GNUNET_SCHEDULER_add_at (cr->timeout_at,
                                     &config_request_timeout,
                                     cr);
@@ -774,6 +779,8 @@ check_config (struct GNUNET_TIME_Relative timeout,
   if (MHD_HTTP_OK == cr->http_status)
     return cr;
   cr->timeout_at = GNUNET_TIME_relative_to_absolute (timeout);
+  if (NULL != cr->tt)
+    GNUNET_SCHEDULER_cancel (cr->tt);
   cr->tt = GNUNET_SCHEDULER_add_at (cr->timeout_at,
                                     &config_request_timeout,
                                     cr);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]