gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] 01/03: -remove silly, impossible case


From: gnunet
Subject: [taler-anastasis] 01/03: -remove silly, impossible case
Date: Fri, 13 Dec 2024 15:32:21 +0100

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

grothoff pushed a commit to branch master
in repository anastasis.

commit 7869fda07fd3ccd810ed5c1494ae817df323a846
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Dec 13 15:04:22 2024 +0100

    -remove silly, impossible case
---
 src/reducer/anastasis_api_redux.c | 51 ++++++++++++++++-----------------------
 1 file changed, 21 insertions(+), 30 deletions(-)

diff --git a/src/reducer/anastasis_api_redux.c 
b/src/reducer/anastasis_api_redux.c
index aad5cca..315f829 100644
--- a/src/reducer/anastasis_api_redux.c
+++ b/src/reducer/anastasis_api_redux.c
@@ -622,42 +622,33 @@ config_cb (void *cls,
     else
       cr->ec = TALER_EC_ANASTASIS_REDUCER_PROVIDER_CONFIG_FAILED;
   }
-  if ( (MHD_HTTP_OK == acfg->http_status) &&
-       (NULL == acfg) )
+  if (0 == acfg->details.ok.storage_limit_in_megabytes)
   {
-    cr->http_status = MHD_HTTP_NOT_FOUND;
-    cr->ec = TALER_EC_ANASTASIS_REDUCER_PROVIDER_CONFIG_FAILED;
+    cr->http_status = 0;
+    cr->ec = TALER_EC_ANASTASIS_REDUCER_PROVIDER_INVALID_CONFIG;
   }
   else
   {
-    if (0 == acfg->details.ok.storage_limit_in_megabytes)
+    cr->ec = TALER_EC_NONE;
+    GNUNET_free (cr->business_name);
+    cr->business_name = GNUNET_strdup (acfg->details.ok.business_name);
+    for (unsigned int i = 0; i<cr->methods_length; i++)
+      GNUNET_free (cr->methods[i].type);
+    GNUNET_free (cr->methods);
+    cr->methods = GNUNET_new_array (acfg->details.ok.methods_length,
+                                    struct AuthorizationMethodConfig);
+    for (unsigned int i = 0; i<acfg->details.ok.methods_length; i++)
     {
-      cr->http_status = 0;
-      cr->ec = TALER_EC_ANASTASIS_REDUCER_PROVIDER_INVALID_CONFIG;
-    }
-    else
-    {
-      cr->ec = TALER_EC_NONE;
-      GNUNET_free (cr->business_name);
-      cr->business_name = GNUNET_strdup (acfg->details.ok.business_name);
-      for (unsigned int i = 0; i<cr->methods_length; i++)
-        GNUNET_free (cr->methods[i].type);
-      GNUNET_free (cr->methods);
-      cr->methods = GNUNET_new_array (acfg->details.ok.methods_length,
-                                      struct AuthorizationMethodConfig);
-      for (unsigned int i = 0; i<acfg->details.ok.methods_length; i++)
-      {
-        cr->methods[i].type = GNUNET_strdup (acfg->details.ok.methods[i].type);
-        cr->methods[i].usage_fee = acfg->details.ok.methods[i].usage_fee;
-      }
-      cr->methods_length = acfg->details.ok.methods_length;
-      cr->storage_limit_in_megabytes =
-        acfg->details.ok.storage_limit_in_megabytes;
-      cr->annual_fee = acfg->details.ok.annual_fee;
-      cr->truth_upload_fee = acfg->details.ok.truth_upload_fee;
-      cr->liability_limit = acfg->details.ok.liability_limit;
-      cr->provider_salt = acfg->details.ok.provider_salt;
+      cr->methods[i].type = GNUNET_strdup (acfg->details.ok.methods[i].type);
+      cr->methods[i].usage_fee = acfg->details.ok.methods[i].usage_fee;
     }
+    cr->methods_length = acfg->details.ok.methods_length;
+    cr->storage_limit_in_megabytes =
+      acfg->details.ok.storage_limit_in_megabytes;
+    cr->annual_fee = acfg->details.ok.annual_fee;
+    cr->truth_upload_fee = acfg->details.ok.truth_upload_fee;
+    cr->liability_limit = acfg->details.ok.liability_limit;
+    cr->provider_salt = acfg->details.ok.provider_salt;
   }
   notify_waiting (cr);
   if (MHD_HTTP_OK != acfg->http_status)

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