Fix #5558.
This commit is contained in:
parent
e1ec7fc53c
commit
bb44b9b475
@ -140,7 +140,8 @@ history_cb (void *cls,
|
||||
void
|
||||
confirmation_cb (void *cls,
|
||||
int success,
|
||||
uint64_t serial_id,
|
||||
const void *row_id,
|
||||
size_t row_id_size,
|
||||
const char *emsg)
|
||||
{
|
||||
if (GNUNET_YES != success)
|
||||
|
@ -1647,7 +1647,8 @@ prepare_cb (void *cls,
|
||||
static void
|
||||
wire_confirm_cb (void *cls,
|
||||
int success,
|
||||
uint64_t serial_id,
|
||||
const void *row_id,
|
||||
size_t row_id_size,
|
||||
const char *emsg)
|
||||
{
|
||||
struct TALER_EXCHANGEDB_Session *session = wpd->session;
|
||||
|
@ -148,10 +148,10 @@ struct TALER_WIRE_HistoryHandle;
|
||||
typedef void
|
||||
(*TALER_WIRE_ConfirmationCallback)(void *cls,
|
||||
int success,
|
||||
uint64_t serial_id,
|
||||
const void *row_id,
|
||||
size_t row_id_size,
|
||||
const char *emsg);
|
||||
|
||||
|
||||
/**
|
||||
* @brief The plugin API, returned from the plugin's "init" function.
|
||||
* The argument given to "init" is simply a configuration handle.
|
||||
|
@ -632,6 +632,7 @@ execute_cb (void *cls,
|
||||
json_t *reason;
|
||||
const char *emsg;
|
||||
char *s;
|
||||
uint64_t serial_id_nbo;
|
||||
|
||||
eh->aaih = NULL;
|
||||
emsg = NULL;
|
||||
@ -653,10 +654,15 @@ execute_cb (void *cls,
|
||||
"%u/%u",
|
||||
http_status,
|
||||
(unsigned int) ec);
|
||||
|
||||
serial_id_nbo = GNUNET_htonll (serial_id);
|
||||
|
||||
eh->cc (eh->cc_cls,
|
||||
(MHD_HTTP_OK == http_status) ? GNUNET_OK : GNUNET_SYSERR,
|
||||
serial_id,
|
||||
&serial_id_nbo,
|
||||
sizeof (uint64_t),
|
||||
(MHD_HTTP_OK == http_status) ? NULL : s);
|
||||
|
||||
GNUNET_free (s);
|
||||
GNUNET_free (eh);
|
||||
}
|
||||
|
@ -153,18 +153,21 @@ timeout_cb (void *cls)
|
||||
* @param cls closure
|
||||
* @param ec taler status code
|
||||
* @param dir direction of the transfer
|
||||
* @param row_off identification of the position at which we are querying
|
||||
* @param row_off identification of the position at
|
||||
* which we are querying
|
||||
* @param row_off_size number of bytes in @a row_off
|
||||
* @param details details about the wire transfer
|
||||
* @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration
|
||||
* @return #GNUNET_OK to continue, #GNUNET_SYSERR to
|
||||
* abort iteration
|
||||
*/
|
||||
static int
|
||||
history_result_cb (void *cls,
|
||||
enum TALER_ErrorCode ec,
|
||||
enum TALER_BANK_Direction dir,
|
||||
const void *row_off,
|
||||
size_t row_off_size,
|
||||
const struct TALER_WIRE_TransferDetails *details)
|
||||
history_result_cb
|
||||
(void *cls,
|
||||
enum TALER_ErrorCode ec,
|
||||
enum TALER_BANK_Direction dir,
|
||||
const void *row_off,
|
||||
size_t row_off_size,
|
||||
const struct TALER_WIRE_TransferDetails *details)
|
||||
{
|
||||
uint64_t *serialp;
|
||||
uint64_t serialh;
|
||||
@ -222,16 +225,20 @@ history_result_cb (void *cls,
|
||||
* Function called with the result from the execute step.
|
||||
*
|
||||
* @param cls closure
|
||||
* @param success #GNUNET_OK on success, #GNUNET_SYSERR on failure
|
||||
* @param serial_id unique ID of the wire transfer in the bank's records; UINT64_MAX on error
|
||||
* @param success #GNUNET_OK on success,
|
||||
* #GNUNET_SYSERR on failure
|
||||
* @param row_id ID of the fresh transaction,
|
||||
* in _network_ byte order.
|
||||
* @param emsg NULL on success, otherwise an error message
|
||||
*/
|
||||
static void
|
||||
confirmation_cb (void *cls,
|
||||
int success,
|
||||
uint64_t serial_id,
|
||||
const void *row_id,
|
||||
size_t row_id_size,
|
||||
const char *emsg)
|
||||
{
|
||||
uint64_t tmp;
|
||||
eh = NULL;
|
||||
if (GNUNET_OK != success)
|
||||
{
|
||||
@ -240,7 +247,13 @@ confirmation_cb (void *cls,
|
||||
GNUNET_SCHEDULER_shutdown ();
|
||||
return;
|
||||
}
|
||||
serial_target = serial_id;
|
||||
|
||||
memcpy (&tmp,
|
||||
row_id,
|
||||
row_id_size);
|
||||
|
||||
serial_target = GNUNET_ntohll (tmp);
|
||||
|
||||
hh = plugin->get_history (plugin->cls,
|
||||
my_account,
|
||||
TALER_BANK_DIRECTION_BOTH,
|
||||
|
Loading…
Reference in New Issue
Block a user