summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-10-24 00:34:43 +0200
committerChristian Grothoff <christian@grothoff.org>2017-10-24 00:34:43 +0200
commitc94688c3e908b551b5b3f0763c4d6d64ba69caef (patch)
tree1bce33746d56b4489743da4687494cc3e66fcf44
parent45dadeda49dcabd2b0346a7d70d628542254fc5d (diff)
downloadmerchant-c94688c3e908b551b5b3f0763c4d6d64ba69caef.tar.gz
merchant-c94688c3e908b551b5b3f0763c4d6d64ba69caef.tar.bz2
merchant-c94688c3e908b551b5b3f0763c4d6d64ba69caef.zip
work around build error for incomplete /tip implementation
-rw-r--r--src/backend/taler-merchant-httpd_tip-authorize.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/taler-merchant-httpd_tip-authorize.c b/src/backend/taler-merchant-httpd_tip-authorize.c
index 415352a0..ad33b37b 100644
--- a/src/backend/taler-merchant-httpd_tip-authorize.c
+++ b/src/backend/taler-merchant-httpd_tip-authorize.c
@@ -81,7 +81,6 @@ MH_handler_tip_authorize (struct TMH_RequestHandler *rh,
const char *upload_data,
size_t *upload_data_size)
{
- enum GNUNET_DB_QueryStatus qs;
struct MerchantInstance *mi;
int res;
struct TALER_Amount amount;
@@ -97,6 +96,7 @@ MH_handler_tip_authorize (struct TMH_RequestHandler *rh,
struct GNUNET_TIME_Absolute expiration;
struct GNUNET_HashCode tip_id;
struct TMH_JsonParseContext *ctx;
+ enum TALER_ErrorCode ec;
if (NULL == *connection_cls)
{
@@ -144,20 +144,20 @@ MH_handler_tip_authorize (struct TMH_RequestHandler *rh,
TALER_EC_TIP_AUTHORIZE_INSTANCE_DOES_NOT_TIP,
"exchange for tipping not configured for the instance");
}
- qs = db->authorize_tip (db->cls,
+ ec = db->authorize_tip (db->cls,
justification,
&amount,
&mi->tip_reserve,
&expiration,
&tip_id);
- if (0 > qs)
+ if (TALER_EC_NONE != ec)
{
- GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR != qs);
+ /* FIXME: differenciate better between ec's */
return TMH_RESPONSE_reply_internal_error (connection,
- TALER_EC_TIP_AUTHORIZE_DB_TRANSACTION_ERROR,
+ ec,
"Database error approving tip");
}
- if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
+ if (0)
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Insufficient funds to authorize tip over `%s' at instance `%s'\n",