This commit is contained in:
Christian Grothoff 2020-01-14 15:12:02 +01:00
parent 90886bd411
commit cba9f8614e
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
3 changed files with 15 additions and 7 deletions

View File

@ -1,6 +1,6 @@
/* /*
This file is part of TALER This file is part of TALER
Copyright (C) 2019 GNUnet e.V. Copyright (C) 2019-2020 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it TALER is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published under the terms of the GNU General Public License as published
@ -16,10 +16,9 @@
License along with TALER; see the file COPYING. If not, see License along with TALER; see the file COPYING. If not, see
<http://www.gnu.org/licenses/> <http://www.gnu.org/licenses/>
*/ */
/** /**
* @file lib/teah_common.c * @file curl/curl.c
* @brief Helper routines shared by libtalerexchange and libtalerauditor * @brief Helper routines for interactions with libcurl
* @author Christian Grothoff * @author Christian Grothoff
*/ */
#include "platform.h" #include "platform.h"

View File

@ -1,6 +1,6 @@
/* /*
This file is part of TALER This file is part of TALER
Copyright (C) 2014-2017 Inria and GNUnet e.V. Copyright (C) 2014-2020 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free Software terms of the GNU Affero General Public License as published by the Free Software
@ -432,7 +432,10 @@ TEH_DEPOSIT_handler_deposit (struct TEH_RequestHandler *rh,
upload_data_size, upload_data_size,
&json); &json);
if (GNUNET_SYSERR == res) if (GNUNET_SYSERR == res)
{
GNUNET_break (0);
return MHD_NO; return MHD_NO;
}
if ( (GNUNET_NO == res) || if ( (GNUNET_NO == res) ||
(NULL == json) ) (NULL == json) )
return MHD_YES; return MHD_YES;
@ -444,10 +447,15 @@ TEH_DEPOSIT_handler_deposit (struct TEH_RequestHandler *rh,
spec); spec);
json_decref (json); json_decref (json);
if (GNUNET_SYSERR == res) if (GNUNET_SYSERR == res)
{
GNUNET_break (0);
return MHD_NO; /* hard failure */ return MHD_NO; /* hard failure */
}
if (GNUNET_NO == res) if (GNUNET_NO == res)
{
GNUNET_break_op (0);
return MHD_YES; /* failure */ return MHD_YES; /* failure */
}
deposit.receiver_wire_account = wire; deposit.receiver_wire_account = wire;
if (deposit.refund_deadline.abs_value_us > deposit.wire_deadline.abs_value_us) if (deposit.refund_deadline.abs_value_us > deposit.wire_deadline.abs_value_us)
{ {

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# #
# This file is part of TALER # This file is part of TALER
# Copyright (C) 2015, 2016 Inria and GNUnet e.V. # Copyright (C) 2015-2020 Taler Systems SA
# #
# TALER is free software; you can redistribute it and/or modify it under the # TALER is free software; you can redistribute it and/or modify it under the
# terms of the GNU Affero General Public License as published by the Free Software # terms of the GNU Affero General Public License as published by the Free Software
@ -31,6 +31,7 @@ taler-exchange-wire -c test_taler_exchange_httpd.conf || exit 1
# Run Exchange HTTPD (in background) # Run Exchange HTTPD (in background)
taler-exchange-httpd -c test_taler_exchange_httpd.conf -i & taler-exchange-httpd -c test_taler_exchange_httpd.conf -i &
# Give HTTP time to start # Give HTTP time to start
# FIXME: replace with while-loop waiting for wget to succeed as in test-auditor.sh!
sleep 5 sleep 5
# Finally run test... # Finally run test...
# We read the JSON snippets to POST from test_taler_exchange_httpd.data # We read the JSON snippets to POST from test_taler_exchange_httpd.data