fix #4851
This commit is contained in:
parent
7ba2ee0966
commit
5f5babca93
@ -624,10 +624,6 @@ exchange_serve_process_config ()
|
||||
(unsigned int) TALER_CURRENCY_LEN);
|
||||
return GNUNET_SYSERR;
|
||||
}
|
||||
if (GNUNET_OK !=
|
||||
TEH_VALIDATION_init (cfg))
|
||||
return GNUNET_SYSERR;
|
||||
|
||||
if (GNUNET_OK !=
|
||||
GNUNET_CONFIGURATION_get_value_string (cfg,
|
||||
"exchange",
|
||||
@ -637,7 +633,6 @@ exchange_serve_process_config ()
|
||||
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
|
||||
"exchange",
|
||||
"master_public_key");
|
||||
TEH_VALIDATION_done ();
|
||||
return GNUNET_SYSERR;
|
||||
}
|
||||
if (GNUNET_OK !=
|
||||
@ -648,11 +643,17 @@ exchange_serve_process_config ()
|
||||
fprintf (stderr,
|
||||
"Invalid master public key given in exchange configuration.");
|
||||
GNUNET_free (TEH_master_public_key_str);
|
||||
TEH_VALIDATION_done ();
|
||||
return GNUNET_SYSERR;
|
||||
}
|
||||
GNUNET_free (TEH_master_public_key_str);
|
||||
|
||||
if ( (GNUNET_OK !=
|
||||
TEH_VALIDATION_init (cfg)) ||
|
||||
(GNUNET_OK !=
|
||||
TEH_WIRE_init ()) )
|
||||
return GNUNET_SYSERR;
|
||||
|
||||
|
||||
if (NULL ==
|
||||
(TEH_plugin = TALER_EXCHANGEDB_plugin_load (cfg)))
|
||||
{
|
||||
|
@ -615,7 +615,7 @@ TEH_DB_execute_reserve_status (struct MHD_Connection *connection,
|
||||
"error", "Reserve not found",
|
||||
"parameter", "withdraw_pub");
|
||||
res = TEH_RESPONSE_reply_reserve_status_success (connection,
|
||||
rh);
|
||||
rh);
|
||||
TEH_plugin->free_reserve_history (TEH_plugin->cls,
|
||||
rh);
|
||||
return res;
|
||||
|
@ -120,15 +120,34 @@ TEH_WIRE_handler_wire (struct TEH_RequestHandler *rh,
|
||||
const char *upload_data,
|
||||
size_t *upload_data_size)
|
||||
{
|
||||
if (NULL == wire_methods)
|
||||
wire_methods = TEH_VALIDATION_get_wire_methods ("exchange-wire-incoming");
|
||||
|
||||
GNUNET_assert (NULL != wire_methods);
|
||||
return TEH_RESPONSE_reply_json (connection,
|
||||
wire_methods,
|
||||
MHD_HTTP_OK);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initialize wire subsystem.
|
||||
*
|
||||
* @return #GNUNET_OK on success, #GNUNET_SYSERR if we found no valid
|
||||
* wire methods
|
||||
*/
|
||||
int
|
||||
TEH_WIRE_init ()
|
||||
{
|
||||
wire_methods = TEH_VALIDATION_get_wire_methods ("exchange-wire-incoming");
|
||||
if ( (NULL == wire_methods) ||
|
||||
(0 == json_object_size (wire_methods)) )
|
||||
{
|
||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||
"Failed to find properly configured wire transfer method\n");
|
||||
return GNUNET_SYSERR;
|
||||
}
|
||||
return GNUNET_OK;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initialize libgcrypt.
|
||||
*/
|
||||
|
@ -26,6 +26,16 @@
|
||||
#include "taler-exchange-httpd.h"
|
||||
|
||||
|
||||
/**
|
||||
* Initialize wire subsystem.
|
||||
*
|
||||
* @return #GNUNET_OK on success, #GNUNET_SYSERR if we found no valid
|
||||
* wire methods
|
||||
*/
|
||||
int
|
||||
TEH_WIRE_init (void);
|
||||
|
||||
|
||||
/**
|
||||
* Obtain fee structure for @a wire_plugin_name wire transfers.
|
||||
*
|
||||
|
@ -2186,8 +2186,8 @@ postgres_get_reserve_history (void *cls,
|
||||
GNUNET_assert (NULL != rh_tail);
|
||||
GNUNET_assert (NULL == rh_tail->next);
|
||||
result = GNUNET_PQ_exec_prepared (session->conn,
|
||||
"get_reserves_out",
|
||||
params);
|
||||
"get_reserves_out",
|
||||
params);
|
||||
if (PGRES_TUPLES_OK != PQresultStatus (result))
|
||||
{
|
||||
QUERY_ERR (result);
|
||||
|
Loading…
Reference in New Issue
Block a user