gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated: fix shutdown logic


From: gnunet
Subject: [taler-anastasis] branch master updated: fix shutdown logic
Date: Sun, 28 Mar 2021 21:23:19 +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 bb3ff2b  fix shutdown logic
bb3ff2b is described below

commit bb3ff2b055c929c5b60b1acb9273f2144f000c53
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Mar 28 21:23:16 2021 +0200

    fix shutdown logic
---
 src/authorization/anastasis_authorization_plugin_email.c |  2 +-
 src/authorization/anastasis_authorization_plugin_post.c  |  2 +-
 src/authorization/anastasis_authorization_plugin_sms.c   |  2 +-
 src/backend/anastasis-httpd_policy_upload.c              |  2 +-
 src/backend/anastasis-httpd_truth.c                      | 10 ++++++++++
 src/backend/anastasis-httpd_truth_upload.c               | 10 ++++++++++
 src/stasis/plugin_anastasis_postgres.c                   |  2 +-
 7 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/src/authorization/anastasis_authorization_plugin_email.c 
b/src/authorization/anastasis_authorization_plugin_email.c
index d7174e2..6cb5cb7 100644
--- a/src/authorization/anastasis_authorization_plugin_email.c
+++ b/src/authorization/anastasis_authorization_plugin_email.c
@@ -291,7 +291,7 @@ email_process (struct ANASTASIS_AUTHORIZATION_State *as,
         &as->truth_uuid,
         sizeof (as->truth_uuid));
       GNUNET_asprintf (&as->msg,
-                       "Subject: Anastasis recovery code: #%llu\n\nThis is for 
challenge %s.\n",
+                       "Subject: Anastasis recovery code: A-%llu\n\nThis is 
for challenge %s.\n",
                        (unsigned long long) as->code,
                        tpk);
       GNUNET_free (tpk);
diff --git a/src/authorization/anastasis_authorization_plugin_post.c 
b/src/authorization/anastasis_authorization_plugin_post.c
index d5e8147..f59eec3 100644
--- a/src/authorization/anastasis_authorization_plugin_post.c
+++ b/src/authorization/anastasis_authorization_plugin_post.c
@@ -365,7 +365,7 @@ post_process (struct ANASTASIS_AUTHORIZATION_State *as,
       GNUNET_asprintf (&as->msg,
                        "Dear Customer\n\n"
                        "The Anastasis recovery code you need to\n"
-                       "recover your data is #%llu.\n"
+                       "recover your data is A-%llu.\n"
                        "This is for challenge %s.\n\n"
                        "Best regards\n\n"
                        "Your Anastasis provider",
diff --git a/src/authorization/anastasis_authorization_plugin_sms.c 
b/src/authorization/anastasis_authorization_plugin_sms.c
index ba4750a..10c6ec6 100644
--- a/src/authorization/anastasis_authorization_plugin_sms.c
+++ b/src/authorization/anastasis_authorization_plugin_sms.c
@@ -290,7 +290,7 @@ sms_process (struct ANASTASIS_AUTHORIZATION_State *as,
         &as->truth_uuid,
         sizeof (as->truth_uuid));
       GNUNET_asprintf (&as->msg,
-                       "#%llu\nAnastasis\n%s",
+                       "A-%llu\nAnastasis\n%s",
                        (unsigned long long) as->code,
                        tpk);
       GNUNET_free (tpk);
diff --git a/src/backend/anastasis-httpd_policy_upload.c 
b/src/backend/anastasis-httpd_policy_upload.c
index 5c7651d..d97b58b 100644
--- a/src/backend/anastasis-httpd_policy_upload.c
+++ b/src/backend/anastasis-httpd_policy_upload.c
@@ -168,7 +168,6 @@ AH_resume_all_bc ()
     GNUNET_CONTAINER_DLL_remove (puc_head,
                                  puc_tail,
                                  puc);
-    MHD_resume_connection (puc->con);
     if (NULL != puc->po)
     {
       TALER_MERCHANT_orders_post_cancel (puc->po);
@@ -179,6 +178,7 @@ AH_resume_all_bc ()
       TALER_MERCHANT_merchant_order_get_cancel (puc->cpo);
       puc->cpo = NULL;
     }
+    MHD_resume_connection (puc->con);
   }
 }
 
diff --git a/src/backend/anastasis-httpd_truth.c 
b/src/backend/anastasis-httpd_truth.c
index 58753a8..d417708 100644
--- a/src/backend/anastasis-httpd_truth.c
+++ b/src/backend/anastasis-httpd_truth.c
@@ -178,6 +178,16 @@ AH_truth_shutdown (void)
                                  gc_tail,
                                  gc);
     gc->in_list = false;
+    if (NULL != gc->cpo)
+    {
+      TALER_MERCHANT_merchant_order_get_cancel (gc->cpo);
+      gc->cpo = NULL;
+    }
+    if (NULL != gc->po)
+    {
+      TALER_MERCHANT_orders_post_cancel (gc->po);
+      gc->po = NULL;
+    }
     if (gc->suspended)
     {
       MHD_resume_connection (gc->connection);
diff --git a/src/backend/anastasis-httpd_truth_upload.c 
b/src/backend/anastasis-httpd_truth_upload.c
index 3dcee59..b5696eb 100644
--- a/src/backend/anastasis-httpd_truth_upload.c
+++ b/src/backend/anastasis-httpd_truth_upload.c
@@ -112,6 +112,16 @@ AH_truth_upload_shutdown (void)
     GNUNET_CONTAINER_DLL_remove (tuc_head,
                                  tuc_tail,
                                  tuc);
+    if (NULL != tuc->cpo)
+    {
+      TALER_MERCHANT_merchant_order_get_cancel (tuc->cpo);
+      tuc->cpo = NULL;
+    }
+    if (NULL != tuc->po)
+    {
+      TALER_MERCHANT_orders_post_cancel (tuc->po);
+      tuc->po = NULL;
+    }
     MHD_resume_connection (tuc->connection);
   }
 }
diff --git a/src/stasis/plugin_anastasis_postgres.c 
b/src/stasis/plugin_anastasis_postgres.c
index 7653cf1..bd4b2b8 100644
--- a/src/stasis/plugin_anastasis_postgres.c
+++ b/src/stasis/plugin_anastasis_postgres.c
@@ -1634,7 +1634,7 @@ postgres_create_challenge_code (
     }
 
     *code = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_NONCE,
-                                      999999);
+                                      INT64_MAX);
     *retransmission_date = GNUNET_TIME_UNIT_ZERO_ABS;
     {
       struct GNUNET_PQ_QueryParam params[] = {

-- 
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]