[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 04/04: -less nested scope
From: |
gnunet |
Subject: |
[taler-exchange] 04/04: -less nested scope |
Date: |
Wed, 29 Nov 2023 21:15:55 +0100 |
This is an automated email from the git hooks/post-receive script.
oec pushed a commit to branch master
in repository exchange.
commit 6dc78a22b39a9a84bb7a3d46dccc3f7110e42a4b
Author: Özgür Kesim <oec-taler@kesim.org>
AuthorDate: Wed Nov 29 21:15:47 2023 +0100
-less nested scope
---
src/exchange/taler-exchange-httpd_extensions.c | 65 ++++++++++++--------------
1 file changed, 30 insertions(+), 35 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd_extensions.c
b/src/exchange/taler-exchange-httpd_extensions.c
index 1ee573b0..dd0fada7 100644
--- a/src/exchange/taler-exchange-httpd_extensions.c
+++ b/src/exchange/taler-exchange-httpd_extensions.c
@@ -357,44 +357,39 @@ TEH_extensions_post_handler (
}
+ if (GNUNET_OK !=
+ ext->policy_post_handler (root,
+ &args[1],
+ policy_details,
+ policy_details_count,
+ &output))
{
- enum GNUNET_GenericReturnValue ret;
-
- ret = ext->policy_post_handler (root,
- &args[1],
- policy_details,
- policy_details_count,
- &output);
-
- if (GNUNET_OK != ret)
- {
- TALER_MHD_reply_json_steal (
- rc->connection,
- output,
- MHD_HTTP_BAD_REQUEST);
- }
+ return TALER_MHD_reply_json_steal (
+ rc->connection,
+ output,
+ MHD_HTTP_BAD_REQUEST);
+ }
- /* execute fulfillment transaction */
+ /* execute fulfillment transaction */
+ {
+ MHD_RESULT mhd_ret;
+ struct TALER_PolicyFulfillmentTransactionData fulfillment = {
+ .proof = root,
+ .timestamp = GNUNET_TIME_timestamp_get (),
+ .details = policy_details,
+ .details_count = policy_details_count
+ };
+
+ if (GNUNET_OK !=
+ TEH_DB_run_transaction (rc->connection,
+ "execute policy fulfillment",
+ TEH_MT_REQUEST_POLICY_FULFILLMENT,
+ &mhd_ret,
+ &policy_fulfillment_transaction,
+ &fulfillment))
{
- MHD_RESULT mhd_ret;
- struct TALER_PolicyFulfillmentTransactionData fulfillment = {
- .proof = root,
- .timestamp = GNUNET_TIME_timestamp_get (),
- .details = policy_details,
- .details_count = policy_details_count
- };
-
- if (GNUNET_OK !=
- TEH_DB_run_transaction (rc->connection,
- "execute policy fulfillment",
- TEH_MT_REQUEST_POLICY_FULFILLMENT,
- &mhd_ret,
- &policy_fulfillment_transaction,
- &fulfillment))
- {
- json_decref (output);
- return mhd_ret;
- }
+ json_decref (output);
+ return mhd_ret;
}
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.