aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-04-01 20:34:50 +0200
committerChristian Grothoff <christian@grothoff.org>2024-04-01 20:34:50 +0200
commitab8e426cae07d43ec7862c9ea9cc4279902bde8b (patch)
treebc5fc58be9665151126eb3d9469e9b7dfba97abb /src
parentd7b1ca64b10c51dd2e52d452d19ac416fdb2d2b3 (diff)
return error code from taler-merchant-exchange if ever any transaction had an issue
Diffstat (limited to 'src')
-rw-r--r--src/backend/taler-merchant-exchange.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/backend/taler-merchant-exchange.c b/src/backend/taler-merchant-exchange.c
index e499589e..80802956 100644
--- a/src/backend/taler-merchant-exchange.c
+++ b/src/backend/taler-merchant-exchange.c
@@ -238,6 +238,11 @@ static struct GNUNET_DB_EventHandler *eh;
static unsigned int active_inquiries;
/**
+ * Set to true if we ever encountered any problem.
+ */
+static bool found_problem;
+
+/**
* Value to return from main(). 0 on success, non-zero on errors.
*/
static int global_ret;
@@ -394,6 +399,8 @@ update_transaction_status (const struct Inquiry *w,
{
enum GNUNET_DB_QueryStatus qs;
+ if (failed)
+ found_problem = true;
qs = db_plugin->update_transfer_status (db_plugin->cls,
w->exchange->exchange_url,
&w->wtid,
@@ -1273,6 +1280,9 @@ main (int argc,
return EXIT_INVALIDARGUMENT;
if (GNUNET_NO == ret)
return EXIT_SUCCESS;
+ if ( (found_problem) &&
+ (0 == global_ret) )
+ global_ret = 7;
return global_ret;
}