exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 2fc6afe94693e826795f5cda768c6b3a9b11f2dd
parent 0659100bdff687d87a2cb0242fc26a18d70c710b
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri, 22 Jan 2016 17:21:36 +0100

more robust error handling

Diffstat:
Msrc/mint/taler-mint-httpd_db.c | 14++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/mint/taler-mint-httpd_db.c b/src/mint/taler-mint-httpd_db.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014, 2015 GNUnet e.V. + Copyright (C) 2014, 2015, 2016 GNUnet e.V. TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -1887,7 +1887,7 @@ TMH_DB_execute_deposit_wtid (struct MHD_Connection *connection, ctx.h_wire = *h_wire; ctx.coin_pub = *coin_pub; ctx.transaction_id = transaction_id; - ctx.res = MHD_NO; /* this value should never be read... */ + ctx.res = GNUNET_SYSERR; ret = TMH_plugin->wire_lookup_deposit_wtid (TMH_plugin->cls, session, h_contract, @@ -1900,10 +1900,20 @@ TMH_DB_execute_deposit_wtid (struct MHD_Connection *connection, if (GNUNET_SYSERR == ret) { GNUNET_break (0); + GNUNET_break (GNUNET_SYSERR == ctx.res); return TMH_RESPONSE_reply_internal_db_error (connection); } if (GNUNET_NO == ret) + { + GNUNET_break (GNUNET_SYSERR == ctx.res); return TMH_RESPONSE_reply_deposit_unknown (connection); + } + if (GNUNET_SYSERR == ctx.res) + { + GNUNET_break (0); + return TMH_RESPONSE_reply_internal_error (connection, + "bug resolving deposit wtid"); + } return ctx.res; }