fix compiler warnings
This commit is contained in:
parent
36efe024f5
commit
2696688aa3
@ -367,7 +367,9 @@ handle_mhd_completion_callback (void *cls,
|
|||||||
enum MHD_RequestTerminationCode toe)
|
enum MHD_RequestTerminationCode toe)
|
||||||
{
|
{
|
||||||
/* struct TALER_FAKEBANK_Handle *h = cls; */
|
/* struct TALER_FAKEBANK_Handle *h = cls; */
|
||||||
|
(void) cls;
|
||||||
|
(void) connection;
|
||||||
|
(void) toe;
|
||||||
GNUNET_JSON_post_parser_cleanup (*con_cls);
|
GNUNET_JSON_post_parser_cleanup (*con_cls);
|
||||||
*con_cls = NULL;
|
*con_cls = NULL;
|
||||||
}
|
}
|
||||||
@ -607,6 +609,8 @@ handle_home_page (struct TALER_FAKEBANK_Handle *h,
|
|||||||
struct MHD_Response *resp;
|
struct MHD_Response *resp;
|
||||||
#define HELLOMSG "Hello, Fakebank!"
|
#define HELLOMSG "Hello, Fakebank!"
|
||||||
|
|
||||||
|
(void) h;
|
||||||
|
(void) con_cls;
|
||||||
resp = MHD_create_response_from_buffer
|
resp = MHD_create_response_from_buffer
|
||||||
(strlen (HELLOMSG),
|
(strlen (HELLOMSG),
|
||||||
HELLOMSG,
|
HELLOMSG,
|
||||||
@ -640,7 +644,9 @@ handle_history (struct TALER_FAKEBANK_Handle *h,
|
|||||||
const char *delta;
|
const char *delta;
|
||||||
struct Transaction *pos;
|
struct Transaction *pos;
|
||||||
|
|
||||||
if (GNUNET_OK != TFH_parse_history_common_args (connection,
|
(void) con_cls;
|
||||||
|
if (GNUNET_OK !=
|
||||||
|
TFH_parse_history_common_args (connection,
|
||||||
&ha))
|
&ha))
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
@ -666,9 +672,10 @@ handle_history (struct TALER_FAKEBANK_Handle *h,
|
|||||||
ha.range = &hri;
|
ha.range = &hri;
|
||||||
|
|
||||||
if (NULL == start)
|
if (NULL == start)
|
||||||
|
{
|
||||||
pos = 0 > hri.count ?
|
pos = 0 > hri.count ?
|
||||||
h->transactions_tail : h->transactions_head;
|
h->transactions_tail : h->transactions_head;
|
||||||
|
}
|
||||||
else if (NULL != h->transactions_head)
|
else if (NULL != h->transactions_head)
|
||||||
{
|
{
|
||||||
for (pos = h->transactions_head;
|
for (pos = h->transactions_head;
|
||||||
@ -727,7 +734,9 @@ handle_history_range (struct TALER_FAKEBANK_Handle *h,
|
|||||||
long long unsigned int end_stamp;
|
long long unsigned int end_stamp;
|
||||||
struct Transaction *pos;
|
struct Transaction *pos;
|
||||||
|
|
||||||
if (GNUNET_OK != TFH_parse_history_common_args (connection,
|
(void) con_cls;
|
||||||
|
if (GNUNET_OK !=
|
||||||
|
TFH_parse_history_common_args (connection,
|
||||||
&ha))
|
&ha))
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
@ -771,6 +780,7 @@ handle_history_range (struct TALER_FAKEBANK_Handle *h,
|
|||||||
&TFH_handle_history_range_advance);
|
&TFH_handle_history_range_advance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle incoming HTTP request.
|
* Handle incoming HTTP request.
|
||||||
*
|
*
|
||||||
@ -796,11 +806,10 @@ handle_mhd_request (void *cls,
|
|||||||
{
|
{
|
||||||
struct TALER_FAKEBANK_Handle *h = cls;
|
struct TALER_FAKEBANK_Handle *h = cls;
|
||||||
|
|
||||||
|
(void) version;
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
||||||
"Fakebank, serving: %s\n",
|
"Fakebank, serving: %s\n",
|
||||||
url);
|
url);
|
||||||
|
|
||||||
|
|
||||||
if ( (0 == strcasecmp (url,
|
if ( (0 == strcasecmp (url,
|
||||||
"/")) &&
|
"/")) &&
|
||||||
(0 == strcasecmp (method,
|
(0 == strcasecmp (method,
|
||||||
|
@ -130,6 +130,7 @@ struct Transaction *
|
|||||||
TFH_handle_history_range_skip (const struct HistoryArgs *ha,
|
TFH_handle_history_range_skip (const struct HistoryArgs *ha,
|
||||||
const struct Transaction *pos)
|
const struct Transaction *pos)
|
||||||
{
|
{
|
||||||
|
(void) ha;
|
||||||
/* Transactions
|
/* Transactions
|
||||||
* are stored from "head"/older to "tail"/younger. */
|
* are stored from "head"/older to "tail"/younger. */
|
||||||
return pos->next;
|
return pos->next;
|
||||||
|
@ -43,11 +43,13 @@ run (void *cls,
|
|||||||
const char *cfgfile,
|
const char *cfgfile,
|
||||||
const struct GNUNET_CONFIGURATION_Handle *cfg)
|
const struct GNUNET_CONFIGURATION_Handle *cfg)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) args;
|
||||||
|
(void) cfgfile;
|
||||||
|
(void) cfg;
|
||||||
if (NULL == TALER_FAKEBANK_start (8082))
|
if (NULL == TALER_FAKEBANK_start (8082))
|
||||||
ret = 1;
|
ret = 1;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -74,6 +76,5 @@ main (int argc,
|
|||||||
&run,
|
&run,
|
||||||
NULL))
|
NULL))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -64,9 +64,9 @@ struct HistoryState
|
|||||||
/**
|
/**
|
||||||
* How many rows we want in the result, _at most_. In
|
* How many rows we want in the result, _at most_. In
|
||||||
* the case of /history-range, we fake this value with
|
* the case of /history-range, we fake this value with
|
||||||
* INT64_MAX.
|
* UINT64_MAX.
|
||||||
*/
|
*/
|
||||||
long long num_results;
|
unsigned long long num_results;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle to a pending "history" operation.
|
* Handle to a pending "history" operation.
|
||||||
@ -159,6 +159,10 @@ history_traits (void *cls,
|
|||||||
const char *trait,
|
const char *trait,
|
||||||
unsigned int index)
|
unsigned int index)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) ret;
|
||||||
|
(void) trait;
|
||||||
|
(void) index;
|
||||||
/* Must define this function because some callbacks
|
/* Must define this function because some callbacks
|
||||||
* look for certain traits on _all_ the commands. */
|
* look for certain traits on _all_ the commands. */
|
||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
@ -184,7 +188,7 @@ test_cancelled (struct TALER_TESTING_Interpreter *is,
|
|||||||
current_cmd = &is->commands[off];
|
current_cmd = &is->commands[off];
|
||||||
TALER_LOG_INFO ("Is `%s' rejected?\n",
|
TALER_LOG_INFO ("Is `%s' rejected?\n",
|
||||||
current_cmd->label);
|
current_cmd->label);
|
||||||
for (unsigned int i = 0; i<is->ip; i++)
|
for (int i = 0; i<is->ip; i++)
|
||||||
{
|
{
|
||||||
const struct TALER_TESTING_Command *c = &is->commands[i];
|
const struct TALER_TESTING_Command *c = &is->commands[i];
|
||||||
|
|
||||||
@ -290,13 +294,10 @@ build_history_hit_limit (uint64_t total,
|
|||||||
TALER_TESTING_get_trait_absolute_time (pos,
|
TALER_TESTING_get_trait_absolute_time (pos,
|
||||||
0,
|
0,
|
||||||
×tamp));
|
×tamp));
|
||||||
|
|
||||||
GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us !=
|
GNUNET_assert (GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us !=
|
||||||
hs->end_date.abs_value_us);
|
hs->end_date.abs_value_us);
|
||||||
|
|
||||||
return timestamp->abs_value_us >= hs->end_date.abs_value_us;
|
return timestamp->abs_value_us >= hs->end_date.abs_value_us;
|
||||||
}
|
}
|
||||||
|
|
||||||
return total >= hs->num_results;
|
return total >= hs->num_results;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -714,6 +715,7 @@ compute_result_count (struct TALER_TESTING_Interpreter *is)
|
|||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check that the "/history" response matches the
|
* Check that the "/history" response matches the
|
||||||
* CMD whose offset in the list of CMDs is @a off.
|
* CMD whose offset in the list of CMDs is @a off.
|
||||||
@ -807,6 +809,7 @@ history_cb (void *cls,
|
|||||||
struct TALER_TESTING_Interpreter *is = cls;
|
struct TALER_TESTING_Interpreter *is = cls;
|
||||||
struct HistoryState *hs = is->commands[is->ip].cls;
|
struct HistoryState *hs = is->commands[is->ip].cls;
|
||||||
|
|
||||||
|
(void) row_id;
|
||||||
/*NOTE: "204 No Content" is used to signal the end of results.*/
|
/*NOTE: "204 No Content" is used to signal the end of results.*/
|
||||||
if (MHD_HTTP_NO_CONTENT == http_status)
|
if (MHD_HTTP_NO_CONTENT == http_status)
|
||||||
{
|
{
|
||||||
@ -819,16 +822,19 @@ history_cb (void *cls,
|
|||||||
|
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
total = build_history (is, &h);
|
total = build_history (is, &h);
|
||||||
GNUNET_log
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
(GNUNET_ERROR_TYPE_ERROR,
|
|
||||||
"Expected history of length %llu, got %llu;"
|
"Expected history of length %llu, got %llu;"
|
||||||
" HTTP status code: %u, failed: %d\n",
|
" HTTP status code: %u/%d, failed: %d\n",
|
||||||
(unsigned long long) total,
|
(unsigned long long) total,
|
||||||
(unsigned long long) hs->results_obtained,
|
(unsigned long long) hs->results_obtained,
|
||||||
http_status,
|
http_status,
|
||||||
|
(int) ec,
|
||||||
hs->failed);
|
hs->failed);
|
||||||
print_expected (h, total, UINT_MAX);
|
print_expected (h,
|
||||||
free_history (h, total);
|
total,
|
||||||
|
UINT_MAX);
|
||||||
|
free_history (h,
|
||||||
|
total);
|
||||||
TALER_TESTING_interpreter_fail (is);
|
TALER_TESTING_interpreter_fail (is);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -839,8 +845,7 @@ history_cb (void *cls,
|
|||||||
if (MHD_HTTP_OK != http_status)
|
if (MHD_HTTP_OK != http_status)
|
||||||
{
|
{
|
||||||
hs->hh = NULL;
|
hs->hh = NULL;
|
||||||
GNUNET_log
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
(GNUNET_ERROR_TYPE_ERROR,
|
|
||||||
"Unwanted response code from /history[-range]: %u\n",
|
"Unwanted response code from /history[-range]: %u\n",
|
||||||
http_status);
|
http_status);
|
||||||
TALER_TESTING_interpreter_fail (is);
|
TALER_TESTING_interpreter_fail (is);
|
||||||
@ -892,6 +897,7 @@ history_run (void *cls,
|
|||||||
const uint64_t *row_id_ptr = &row_id;
|
const uint64_t *row_id_ptr = &row_id;
|
||||||
struct TALER_BANK_AuthenticationData *auth;
|
struct TALER_BANK_AuthenticationData *auth;
|
||||||
|
|
||||||
|
(void) cmd;
|
||||||
/* Get row_id from trait. */
|
/* Get row_id from trait. */
|
||||||
if (NULL != hs->start_row_reference)
|
if (NULL != hs->start_row_reference)
|
||||||
{
|
{
|
||||||
@ -940,15 +946,14 @@ history_range_run (void *cls,
|
|||||||
const struct TALER_TESTING_Command *cmd,
|
const struct TALER_TESTING_Command *cmd,
|
||||||
struct TALER_TESTING_Interpreter *is)
|
struct TALER_TESTING_Interpreter *is)
|
||||||
{
|
{
|
||||||
|
|
||||||
struct HistoryState *hs = cls;
|
struct HistoryState *hs = cls;
|
||||||
const struct GNUNET_TIME_Absolute *start_date;
|
const struct GNUNET_TIME_Absolute *start_date;
|
||||||
const struct GNUNET_TIME_Absolute *end_date;
|
const struct GNUNET_TIME_Absolute *end_date;
|
||||||
struct TALER_BANK_AuthenticationData *auth;
|
struct TALER_BANK_AuthenticationData *auth;
|
||||||
|
|
||||||
|
(void) cmd;
|
||||||
if (NULL != hs->start_row_reference)
|
if (NULL != hs->start_row_reference)
|
||||||
{
|
{
|
||||||
|
|
||||||
const struct TALER_TESTING_Command *history_cmd;
|
const struct TALER_TESTING_Command *history_cmd;
|
||||||
|
|
||||||
history_cmd = TALER_TESTING_interpreter_lookup_command
|
history_cmd = TALER_TESTING_interpreter_lookup_command
|
||||||
@ -972,7 +977,6 @@ history_range_run (void *cls,
|
|||||||
|
|
||||||
if (NULL != hs->end_row_reference)
|
if (NULL != hs->end_row_reference)
|
||||||
{
|
{
|
||||||
|
|
||||||
const struct TALER_TESTING_Command *history_cmd;
|
const struct TALER_TESTING_Command *history_cmd;
|
||||||
|
|
||||||
history_cmd = TALER_TESTING_interpreter_lookup_command
|
history_cmd = TALER_TESTING_interpreter_lookup_command
|
||||||
@ -1017,18 +1021,17 @@ history_range_run (void *cls,
|
|||||||
* @param cmd the command which is being cleaned up.
|
* @param cmd the command which is being cleaned up.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
history_cleanup
|
history_cleanup (void *cls,
|
||||||
(void *cls,
|
|
||||||
const struct TALER_TESTING_Command *cmd)
|
const struct TALER_TESTING_Command *cmd)
|
||||||
{
|
{
|
||||||
struct HistoryState *hs = cls;
|
struct HistoryState *hs = cls;
|
||||||
|
|
||||||
|
(void) cmd;
|
||||||
if (NULL != hs->hh)
|
if (NULL != hs->hh)
|
||||||
{
|
{
|
||||||
TALER_LOG_WARNING ("/history did not complete\n");
|
TALER_LOG_WARNING ("/history did not complete\n");
|
||||||
TALER_BANK_history_cancel (hs->hh);
|
TALER_BANK_history_cancel (hs->hh);
|
||||||
}
|
}
|
||||||
|
|
||||||
GNUNET_free (hs);
|
GNUNET_free (hs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1041,24 +1044,22 @@ history_cleanup
|
|||||||
* operation.
|
* operation.
|
||||||
* @param account_no bank account number to ask the history for.
|
* @param account_no bank account number to ask the history for.
|
||||||
* @param direction which direction this operation is interested.
|
* @param direction which direction this operation is interested.
|
||||||
* @param ascending if GNUNET_YES, the bank will return the rows
|
* @param ascending if #GNUNET_YES, the bank will return the rows
|
||||||
* in ascending (= chronological) order.
|
* in ascending (= chronological) order.
|
||||||
* @param start_row_reference reference to a command that can
|
* @param start_row_reference reference to a command that can
|
||||||
* offer a row identifier, to be used as the starting row
|
* offer a row identifier, to be used as the starting row
|
||||||
* to accept in the result.
|
* to accept in the result.
|
||||||
* @param num_result how many rows we want in the result.
|
* @param num_results how many rows we want in the result.
|
||||||
*
|
|
||||||
* @return the command.
|
* @return the command.
|
||||||
*/
|
*/
|
||||||
struct TALER_TESTING_Command
|
struct TALER_TESTING_Command
|
||||||
TALER_TESTING_cmd_bank_history
|
TALER_TESTING_cmd_bank_history (const char *label,
|
||||||
(const char *label,
|
|
||||||
const char *bank_url,
|
const char *bank_url,
|
||||||
uint64_t account_no,
|
uint64_t account_no,
|
||||||
enum TALER_BANK_Direction direction,
|
enum TALER_BANK_Direction direction,
|
||||||
unsigned int ascending,
|
unsigned int ascending,
|
||||||
const char *start_row_reference,
|
const char *start_row_reference,
|
||||||
long long num_results)
|
unsigned long long num_results)
|
||||||
{
|
{
|
||||||
struct HistoryState *hs;
|
struct HistoryState *hs;
|
||||||
|
|
||||||
@ -1072,6 +1073,7 @@ TALER_TESTING_cmd_bank_history
|
|||||||
hs->start_date = GNUNET_TIME_UNIT_FOREVER_ABS;
|
hs->start_date = GNUNET_TIME_UNIT_FOREVER_ABS;
|
||||||
hs->end_date = GNUNET_TIME_UNIT_FOREVER_ABS;
|
hs->end_date = GNUNET_TIME_UNIT_FOREVER_ABS;
|
||||||
|
|
||||||
|
{
|
||||||
struct TALER_TESTING_Command cmd = {
|
struct TALER_TESTING_Command cmd = {
|
||||||
.label = label,
|
.label = label,
|
||||||
.cls = hs,
|
.cls = hs,
|
||||||
@ -1082,6 +1084,7 @@ TALER_TESTING_cmd_bank_history
|
|||||||
|
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1124,6 +1127,7 @@ TALER_TESTING_cmd_bank_history_range
|
|||||||
hs->start_date = GNUNET_TIME_UNIT_FOREVER_ABS;
|
hs->start_date = GNUNET_TIME_UNIT_FOREVER_ABS;
|
||||||
hs->end_date = GNUNET_TIME_UNIT_FOREVER_ABS;
|
hs->end_date = GNUNET_TIME_UNIT_FOREVER_ABS;
|
||||||
|
|
||||||
|
{
|
||||||
struct TALER_TESTING_Command cmd = {
|
struct TALER_TESTING_Command cmd = {
|
||||||
.label = label,
|
.label = label,
|
||||||
.cls = hs,
|
.cls = hs,
|
||||||
@ -1134,6 +1138,7 @@ TALER_TESTING_cmd_bank_history_range
|
|||||||
|
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1173,6 +1178,7 @@ TALER_TESTING_cmd_bank_history_range_with_dates
|
|||||||
hs->start_date = start_date;
|
hs->start_date = start_date;
|
||||||
hs->end_date = end_date;
|
hs->end_date = end_date;
|
||||||
|
|
||||||
|
{
|
||||||
struct TALER_TESTING_Command cmd = {
|
struct TALER_TESTING_Command cmd = {
|
||||||
.label = label,
|
.label = label,
|
||||||
.cls = hs,
|
.cls = hs,
|
||||||
@ -1183,5 +1189,6 @@ TALER_TESTING_cmd_bank_history_range_with_dates
|
|||||||
|
|
||||||
return cmd;
|
return cmd;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* end of testing_api_cmd_history.c */
|
/* end of testing_api_cmd_history.c */
|
||||||
|
@ -79,14 +79,16 @@ reject_cb (void *cls,
|
|||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"Unexpected response code %u:\n",
|
"Unexpected response code %u/%d\n",
|
||||||
http_status);
|
http_status,
|
||||||
|
(int) ec);
|
||||||
TALER_TESTING_interpreter_fail (is);
|
TALER_TESTING_interpreter_fail (is);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TALER_TESTING_interpreter_next (is);
|
TALER_TESTING_interpreter_next (is);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cleanup the state of a "reject" CMD, and possibly
|
* Cleanup the state of a "reject" CMD, and possibly
|
||||||
* cancel a pending operation thereof.
|
* cancel a pending operation thereof.
|
||||||
@ -95,21 +97,21 @@ reject_cb (void *cls,
|
|||||||
* @param cmd the command.
|
* @param cmd the command.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
reject_cleanup
|
reject_cleanup (void *cls,
|
||||||
(void *cls,
|
|
||||||
const struct TALER_TESTING_Command *cmd)
|
const struct TALER_TESTING_Command *cmd)
|
||||||
{
|
{
|
||||||
struct RejectState *rs = cls;
|
struct RejectState *rs = cls;
|
||||||
|
|
||||||
|
(void) cmd;
|
||||||
if (NULL != rs->rh)
|
if (NULL != rs->rh)
|
||||||
{
|
{
|
||||||
TALER_LOG_WARNING ("/reject did not complete\n");
|
TALER_LOG_WARNING ("/reject did not complete\n");
|
||||||
TALER_BANK_reject_cancel (rs->rh);
|
TALER_BANK_reject_cancel (rs->rh);
|
||||||
}
|
}
|
||||||
|
|
||||||
GNUNET_free (rs);
|
GNUNET_free (rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the command.
|
* Run the command.
|
||||||
*
|
*
|
||||||
@ -128,19 +130,18 @@ reject_run (void *cls,
|
|||||||
const uint64_t *row_id;
|
const uint64_t *row_id;
|
||||||
extern struct TALER_BANK_AuthenticationData AUTHS[];
|
extern struct TALER_BANK_AuthenticationData AUTHS[];
|
||||||
|
|
||||||
deposit_cmd = TALER_TESTING_interpreter_lookup_command
|
(void) cmd;
|
||||||
(is, rs->deposit_reference);
|
deposit_cmd
|
||||||
|
= TALER_TESTING_interpreter_lookup_command (is,
|
||||||
|
rs->deposit_reference);
|
||||||
if (NULL == deposit_cmd)
|
if (NULL == deposit_cmd)
|
||||||
TALER_TESTING_FAIL (is);
|
TALER_TESTING_FAIL (is);
|
||||||
|
GNUNET_assert (GNUNET_OK ==
|
||||||
GNUNET_assert
|
TALER_TESTING_GET_TRAIT_CREDIT_ACCOUNT (deposit_cmd,
|
||||||
(GNUNET_OK == TALER_TESTING_GET_TRAIT_CREDIT_ACCOUNT
|
&credit_account));
|
||||||
(deposit_cmd, &credit_account));
|
GNUNET_assert (GNUNET_OK ==
|
||||||
|
TALER_TESTING_GET_TRAIT_ROW_ID (deposit_cmd,
|
||||||
GNUNET_assert
|
&row_id));
|
||||||
(GNUNET_OK == TALER_TESTING_GET_TRAIT_ROW_ID
|
|
||||||
(deposit_cmd, &row_id));
|
|
||||||
TALER_LOG_INFO ("Account %llu rejects deposit\n",
|
TALER_LOG_INFO ("Account %llu rejects deposit\n",
|
||||||
(unsigned long long) *credit_account);
|
(unsigned long long) *credit_account);
|
||||||
rs->rh = TALER_BANK_reject (is->ctx,
|
rs->rh = TALER_BANK_reject (is->ctx,
|
||||||
@ -191,7 +192,6 @@ reject_traits (void *cls,
|
|||||||
* @param deposit_reference reference to a command that will
|
* @param deposit_reference reference to a command that will
|
||||||
* provide a "row id" and credit (bank) account to craft
|
* provide a "row id" and credit (bank) account to craft
|
||||||
* the "reject" request.
|
* the "reject" request.
|
||||||
*
|
|
||||||
* @return the command.
|
* @return the command.
|
||||||
*/
|
*/
|
||||||
struct TALER_TESTING_Command
|
struct TALER_TESTING_Command
|
||||||
@ -205,6 +205,7 @@ TALER_TESTING_cmd_bank_reject (const char *label,
|
|||||||
rs->bank_url = bank_url;
|
rs->bank_url = bank_url;
|
||||||
rs->deposit_reference = deposit_reference;
|
rs->deposit_reference = deposit_reference;
|
||||||
|
|
||||||
|
{
|
||||||
struct TALER_TESTING_Command cmd = {
|
struct TALER_TESTING_Command cmd = {
|
||||||
.cls = rs,
|
.cls = rs,
|
||||||
.run = &reject_run,
|
.run = &reject_run,
|
||||||
@ -214,7 +215,7 @@ TALER_TESTING_cmd_bank_reject (const char *label,
|
|||||||
};
|
};
|
||||||
|
|
||||||
return cmd;
|
return cmd;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -476,6 +476,7 @@ cleanup_au (void)
|
|||||||
static void
|
static void
|
||||||
shutdown_task (void *cls)
|
shutdown_task (void *cls)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
"Running shutdown\n");
|
"Running shutdown\n");
|
||||||
if (NULL != task)
|
if (NULL != task)
|
||||||
@ -626,8 +627,11 @@ refund_by_coin_cb (void *cls,
|
|||||||
{
|
{
|
||||||
struct AggregationUnit *aux = cls;
|
struct AggregationUnit *aux = cls;
|
||||||
|
|
||||||
|
(void) merchant_sig;
|
||||||
|
(void) rtransaction_id;
|
||||||
|
(void) refund_fee;
|
||||||
/* TODO: potential optimization: include these conditions
|
/* TODO: potential optimization: include these conditions
|
||||||
in the SELECT! */
|
in the SELECT, and avoid fetching the values we do not need! */
|
||||||
if (0 != GNUNET_memcmp (merchant_pub,
|
if (0 != GNUNET_memcmp (merchant_pub,
|
||||||
&aux->merchant_pub))
|
&aux->merchant_pub))
|
||||||
return GNUNET_OK; /* different merchant */
|
return GNUNET_OK; /* different merchant */
|
||||||
@ -675,6 +679,10 @@ deposit_cb (void *cls,
|
|||||||
{
|
{
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
|
/* NOTE: potential optimization: use custom SQL API to not
|
||||||
|
fetch this one: */
|
||||||
|
(void) wire_deadline; /* already checked by SQL query */
|
||||||
au->merchant_pub = *merchant_pub;
|
au->merchant_pub = *merchant_pub;
|
||||||
if (GNUNET_SYSERR ==
|
if (GNUNET_SYSERR ==
|
||||||
TALER_amount_subtract (&au->total_amount,
|
TALER_amount_subtract (&au->total_amount,
|
||||||
@ -688,7 +696,6 @@ deposit_cb (void *cls,
|
|||||||
return GNUNET_DB_STATUS_HARD_ERROR;
|
return GNUNET_DB_STATUS_HARD_ERROR;
|
||||||
}
|
}
|
||||||
au->row_id = row_id;
|
au->row_id = row_id;
|
||||||
|
|
||||||
au->h_contract = h_contract_terms;
|
au->h_contract = h_contract_terms;
|
||||||
qs = db_plugin->select_refunds_by_coin (db_plugin->cls,
|
qs = db_plugin->select_refunds_by_coin (db_plugin->cls,
|
||||||
au->session,
|
au->session,
|
||||||
@ -804,6 +811,11 @@ aggregate_cb (void *cls,
|
|||||||
struct TALER_Amount delta;
|
struct TALER_Amount delta;
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
|
/* NOTE: potential optimization: use custom SQL API to not
|
||||||
|
fetch these: */
|
||||||
|
(void) wire_deadline; /* checked by SQL */
|
||||||
|
(void) wire; /* must match */
|
||||||
GNUNET_break (0 == GNUNET_memcmp (&au->merchant_pub,
|
GNUNET_break (0 == GNUNET_memcmp (&au->merchant_pub,
|
||||||
merchant_pub));
|
merchant_pub));
|
||||||
/* compute contribution of this coin after fees */
|
/* compute contribution of this coin after fees */
|
||||||
@ -1078,6 +1090,9 @@ expired_reserve_cb (void *cls,
|
|||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
struct WireAccount *wa;
|
struct WireAccount *wa;
|
||||||
|
|
||||||
|
/* NOTE: potential optimization: use custom SQL API to not
|
||||||
|
fetch this: */
|
||||||
|
(void) expiration_date; /* we know it expired */
|
||||||
GNUNET_assert (NULL == ctc);
|
GNUNET_assert (NULL == ctc);
|
||||||
now = GNUNET_TIME_absolute_get ();
|
now = GNUNET_TIME_absolute_get ();
|
||||||
(void) GNUNET_TIME_round_abs (&now);
|
(void) GNUNET_TIME_round_abs (&now);
|
||||||
@ -1218,6 +1233,7 @@ run_reserve_closures (void *cls)
|
|||||||
struct ExpiredReserveContext erc;
|
struct ExpiredReserveContext erc;
|
||||||
struct GNUNET_TIME_Absolute now;
|
struct GNUNET_TIME_Absolute now;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
task = NULL;
|
task = NULL;
|
||||||
reserves_idle = GNUNET_NO;
|
reserves_idle = GNUNET_NO;
|
||||||
tc = GNUNET_SCHEDULER_get_task_context ();
|
tc = GNUNET_SCHEDULER_get_task_context ();
|
||||||
@ -1305,6 +1321,7 @@ run_aggregation (void *cls)
|
|||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
const struct GNUNET_SCHEDULER_TaskContext *tc;
|
const struct GNUNET_SCHEDULER_TaskContext *tc;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
task = NULL;
|
task = NULL;
|
||||||
tc = GNUNET_SCHEDULER_get_task_context ();
|
tc = GNUNET_SCHEDULER_get_task_context ();
|
||||||
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
|
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
|
||||||
@ -1554,6 +1571,7 @@ prepare_cb (void *cls,
|
|||||||
struct TALER_EXCHANGEDB_Session *session = au->session;
|
struct TALER_EXCHANGEDB_Session *session = au->session;
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
GNUNET_free_non_null (au->additional_rows);
|
GNUNET_free_non_null (au->additional_rows);
|
||||||
au->additional_rows = NULL;
|
au->additional_rows = NULL;
|
||||||
if (NULL == buf)
|
if (NULL == buf)
|
||||||
@ -1663,6 +1681,9 @@ wire_confirm_cb (void *cls,
|
|||||||
struct TALER_EXCHANGEDB_Session *session = wpd->session;
|
struct TALER_EXCHANGEDB_Session *session = wpd->session;
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
|
(void) row_id;
|
||||||
|
(void) row_id_size;
|
||||||
wpd->eh = NULL;
|
wpd->eh = NULL;
|
||||||
if (GNUNET_SYSERR == success)
|
if (GNUNET_SYSERR == success)
|
||||||
{
|
{
|
||||||
@ -1747,6 +1768,7 @@ wire_prepare_cb (void *cls,
|
|||||||
const char *buf,
|
const char *buf,
|
||||||
size_t buf_size)
|
size_t buf_size)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
wpd->row_id = rowid;
|
wpd->row_id = rowid;
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
"Starting wire transfer %llu\n",
|
"Starting wire transfer %llu\n",
|
||||||
@ -1798,6 +1820,7 @@ run_transfers (void *cls)
|
|||||||
struct TALER_EXCHANGEDB_Session *session;
|
struct TALER_EXCHANGEDB_Session *session;
|
||||||
const struct GNUNET_SCHEDULER_TaskContext *tc;
|
const struct GNUNET_SCHEDULER_TaskContext *tc;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
task = NULL;
|
task = NULL;
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
"Checking for pending wire transfers\n");
|
"Checking for pending wire transfers\n");
|
||||||
@ -1877,6 +1900,9 @@ run (void *cls,
|
|||||||
const char *cfgfile,
|
const char *cfgfile,
|
||||||
const struct GNUNET_CONFIGURATION_Handle *c)
|
const struct GNUNET_CONFIGURATION_Handle *c)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) args;
|
||||||
|
(void) cfgfile;
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
GNUNET_CONFIGURATION_get_value_string (c,
|
GNUNET_CONFIGURATION_get_value_string (c,
|
||||||
"exchange",
|
"exchange",
|
||||||
|
@ -167,8 +167,11 @@ handle_mhd_completion_callback (void *cls,
|
|||||||
{
|
{
|
||||||
struct ExchangeHttpRequestClosure *ecls = *con_cls;
|
struct ExchangeHttpRequestClosure *ecls = *con_cls;
|
||||||
|
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Request completed\n");
|
(void) cls;
|
||||||
|
(void) connection;
|
||||||
|
(void) toe;
|
||||||
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
|
"Request completed\n");
|
||||||
if (NULL == ecls)
|
if (NULL == ecls)
|
||||||
return;
|
return;
|
||||||
TEH_PARSE_post_cleanup_callback (ecls->opaque_post_parsing_context);
|
TEH_PARSE_post_cleanup_callback (ecls->opaque_post_parsing_context);
|
||||||
@ -186,14 +189,14 @@ handle_mhd_completion_callback (void *cls,
|
|||||||
* Return GNUNET_YES if given a valid correlation ID and
|
* Return GNUNET_YES if given a valid correlation ID and
|
||||||
* GNUNET_NO otherwise.
|
* GNUNET_NO otherwise.
|
||||||
*
|
*
|
||||||
* @returns GNUNET_YES iff given a valid correlation ID
|
* @returns #GNUNET_YES iff given a valid correlation ID
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
is_valid_correlation_id (const char *correlation_id)
|
is_valid_correlation_id (const char *correlation_id)
|
||||||
{
|
{
|
||||||
if (strlen (correlation_id) >= 64)
|
if (strlen (correlation_id) >= 64)
|
||||||
return GNUNET_NO;
|
return GNUNET_NO;
|
||||||
for (int i = 0; i < strlen (correlation_id); i++)
|
for (size_t i = 0; i < strlen (correlation_id); i++)
|
||||||
if (! (isalnum (correlation_id[i]) || (correlation_id[i] == '-')))
|
if (! (isalnum (correlation_id[i]) || (correlation_id[i] == '-')))
|
||||||
return GNUNET_NO;
|
return GNUNET_NO;
|
||||||
return GNUNET_YES;
|
return GNUNET_YES;
|
||||||
@ -401,7 +404,7 @@ handle_mhd_request (void *cls,
|
|||||||
"Only POST is allowed", 0,
|
"Only POST is allowed", 0,
|
||||||
&TEH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
|
&TEH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
|
||||||
#endif
|
#endif
|
||||||
{ NULL, NULL, NULL, NULL, 0, 0 }
|
{ NULL, NULL, NULL, NULL, 0, NULL, 0 }
|
||||||
};
|
};
|
||||||
static struct TEH_RequestHandler h404 = {
|
static struct TEH_RequestHandler h404 = {
|
||||||
"", NULL, "text/html",
|
"", NULL, "text/html",
|
||||||
@ -415,6 +418,8 @@ handle_mhd_request (void *cls,
|
|||||||
struct GNUNET_AsyncScopeSave old_scope;
|
struct GNUNET_AsyncScopeSave old_scope;
|
||||||
const char *correlation_id = NULL;
|
const char *correlation_id = NULL;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
|
(void) version;
|
||||||
if (NULL == ecls)
|
if (NULL == ecls)
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Handling new request\n");
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Handling new request\n");
|
||||||
@ -817,6 +822,9 @@ connection_done (void *cls,
|
|||||||
void **socket_context,
|
void **socket_context,
|
||||||
enum MHD_ConnectionNotificationCode toe)
|
enum MHD_ConnectionNotificationCode toe)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) connection;
|
||||||
|
(void) socket_context;
|
||||||
/* We only act if the connection is closed. */
|
/* We only act if the connection is closed. */
|
||||||
if (MHD_CONNECTION_NOTIFY_CLOSED != toe)
|
if (MHD_CONNECTION_NOTIFY_CLOSED != toe)
|
||||||
return;
|
return;
|
||||||
@ -849,6 +857,7 @@ handle_mhd_logs (void *cls,
|
|||||||
static int cache;
|
static int cache;
|
||||||
char buf[2048];
|
char buf[2048];
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
if (-1 == cache)
|
if (-1 == cache)
|
||||||
return;
|
return;
|
||||||
if (0 == cache)
|
if (0 == cache)
|
||||||
|
@ -423,6 +423,8 @@ free_denom_key (void *cls,
|
|||||||
{
|
{
|
||||||
struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki = value;
|
struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *dki = value;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
|
(void) key;
|
||||||
if (NULL != dki->denom_priv.rsa_private_key)
|
if (NULL != dki->denom_priv.rsa_private_key)
|
||||||
GNUNET_CRYPTO_rsa_private_key_free (dki->denom_priv.rsa_private_key);
|
GNUNET_CRYPTO_rsa_private_key_free (dki->denom_priv.rsa_private_key);
|
||||||
GNUNET_CRYPTO_rsa_public_key_free (dki->denom_pub.rsa_public_key);
|
GNUNET_CRYPTO_rsa_public_key_free (dki->denom_pub.rsa_public_key);
|
||||||
@ -698,7 +700,7 @@ TALER_EXCHANGE_conf_duration_provide ()
|
|||||||
* @param cls closure with the `struct AddRevocationContext *`
|
* @param cls closure with the `struct AddRevocationContext *`
|
||||||
* @param connection NULL
|
* @param connection NULL
|
||||||
* @param session database session to use
|
* @param session database session to use
|
||||||
* @param[out] mhd_ret NULL
|
* @param[out] mhd_ret not used
|
||||||
* @return transaction status
|
* @return transaction status
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
@ -712,6 +714,8 @@ add_revocations_transaction (void *cls,
|
|||||||
struct TALER_MasterSignatureP master_sig;
|
struct TALER_MasterSignatureP master_sig;
|
||||||
uint64_t rowid;
|
uint64_t rowid;
|
||||||
|
|
||||||
|
(void) connection;
|
||||||
|
(void) mhd_ret;
|
||||||
qs = TEH_plugin->get_denomination_revocation (TEH_plugin->cls,
|
qs = TEH_plugin->get_denomination_revocation (TEH_plugin->cls,
|
||||||
session,
|
session,
|
||||||
&arc->dki->issue.properties.
|
&arc->dki->issue.properties.
|
||||||
@ -736,7 +740,7 @@ add_revocations_transaction (void *cls,
|
|||||||
* @param cls closure with the `const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *`
|
* @param cls closure with the `const struct TALER_EXCHANGEDB_DenominationKeyIssueInformation *`
|
||||||
* @param connection NULL
|
* @param connection NULL
|
||||||
* @param session database session to use
|
* @param session database session to use
|
||||||
* @param[out] mhd_ret NULL
|
* @param[out] mhd_ret not used
|
||||||
* @return transaction status
|
* @return transaction status
|
||||||
*/
|
*/
|
||||||
static enum GNUNET_DB_QueryStatus
|
static enum GNUNET_DB_QueryStatus
|
||||||
@ -749,6 +753,8 @@ add_denomination_transaction (void *cls,
|
|||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
struct TALER_EXCHANGEDB_DenominationKeyInformationP issue_exists;
|
struct TALER_EXCHANGEDB_DenominationKeyInformationP issue_exists;
|
||||||
|
|
||||||
|
(void) connection;
|
||||||
|
(void) mhd_ret;
|
||||||
qs = TEH_plugin->get_denomination_info (TEH_plugin->cls,
|
qs = TEH_plugin->get_denomination_info (TEH_plugin->cls,
|
||||||
session,
|
session,
|
||||||
&dki->issue.properties.denom_hash,
|
&dki->issue.properties.denom_hash,
|
||||||
@ -1314,6 +1320,7 @@ add_auditor_entry (void *cls,
|
|||||||
struct AuditorEntry *ae = value;
|
struct AuditorEntry *ae = value;
|
||||||
json_t *ao;
|
json_t *ao;
|
||||||
|
|
||||||
|
(void) key;
|
||||||
ao = json_pack ("{s:o, s:s, s:o}",
|
ao = json_pack ("{s:o, s:s, s:o}",
|
||||||
"denomination_keys", ae->ar,
|
"denomination_keys", ae->ar,
|
||||||
"auditor_url", ae->auditor_url,
|
"auditor_url", ae->auditor_url,
|
||||||
@ -2310,6 +2317,9 @@ TEH_KS_handler_keys (struct TEH_RequestHandler *rh,
|
|||||||
struct GNUNET_TIME_Absolute now;
|
struct GNUNET_TIME_Absolute now;
|
||||||
const struct KeysResponseData *krd;
|
const struct KeysResponseData *krd;
|
||||||
|
|
||||||
|
(void) connection_cls;
|
||||||
|
(void) upload_data;
|
||||||
|
(void) upload_data_size;
|
||||||
have_cherrypick = MHD_lookup_connection_value (connection,
|
have_cherrypick = MHD_lookup_connection_value (connection,
|
||||||
MHD_GET_ARGUMENT_KIND,
|
MHD_GET_ARGUMENT_KIND,
|
||||||
"last_issue_date");
|
"last_issue_date");
|
||||||
|
@ -119,7 +119,7 @@ auditor_iter (void *cls,
|
|||||||
return GNUNET_OK;
|
return GNUNET_OK;
|
||||||
}
|
}
|
||||||
af = GNUNET_malloc (size);
|
af = GNUNET_malloc (size);
|
||||||
if (size !=
|
if (((ssize_t) size) !=
|
||||||
GNUNET_DISK_fn_read (filename,
|
GNUNET_DISK_fn_read (filename,
|
||||||
af,
|
af,
|
||||||
size))
|
size))
|
||||||
@ -274,22 +274,22 @@ TALER_EXCHANGEDB_auditor_write (const char *filename,
|
|||||||
&af,
|
&af,
|
||||||
wsize)))
|
wsize)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (wrote != wsize)
|
if (wrote != (ssize_t) wsize)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
wsize = dki_len * sizeof (struct TALER_AuditorSignatureP);
|
wsize = dki_len * sizeof (struct TALER_AuditorSignatureP);
|
||||||
if (wsize ==
|
if (((ssize_t) wsize) ==
|
||||||
GNUNET_DISK_file_write (fh,
|
GNUNET_DISK_file_write (fh,
|
||||||
asigs,
|
asigs,
|
||||||
wsize))
|
wsize))
|
||||||
ret = GNUNET_OK;
|
ret = GNUNET_OK;
|
||||||
wsize = dki_len * sizeof (struct TALER_DenominationKeyValidityPS);
|
wsize = dki_len * sizeof (struct TALER_DenominationKeyValidityPS);
|
||||||
if (wsize ==
|
if (((ssize_t) wsize) ==
|
||||||
GNUNET_DISK_file_write (fh,
|
GNUNET_DISK_file_write (fh,
|
||||||
dki,
|
dki,
|
||||||
wsize))
|
wsize))
|
||||||
ret = GNUNET_OK;
|
ret = GNUNET_OK;
|
||||||
wsize = strlen (auditor_url) + 1;
|
wsize = strlen (auditor_url) + 1;
|
||||||
if (wsize ==
|
if (((ssize_t) wsize) ==
|
||||||
GNUNET_DISK_file_write (fh,
|
GNUNET_DISK_file_write (fh,
|
||||||
auditor_url,
|
auditor_url,
|
||||||
wsize))
|
wsize))
|
||||||
|
@ -134,7 +134,7 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename,
|
|||||||
return GNUNET_SYSERR;
|
return GNUNET_SYSERR;
|
||||||
}
|
}
|
||||||
data = GNUNET_malloc (size);
|
data = GNUNET_malloc (size);
|
||||||
if (size !=
|
if (((ssize_t) size) !=
|
||||||
GNUNET_DISK_fn_read (filename,
|
GNUNET_DISK_fn_read (filename,
|
||||||
data,
|
data,
|
||||||
size))
|
size))
|
||||||
@ -217,14 +217,14 @@ TALER_EXCHANGEDB_denomination_key_write (const char *filename,
|
|||||||
&dki->issue,
|
&dki->issue,
|
||||||
wsize)))
|
wsize)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (wrote != wsize)
|
if (wrote != (ssize_t) wsize)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (GNUNET_SYSERR ==
|
if (GNUNET_SYSERR ==
|
||||||
(wrote = GNUNET_DISK_file_write (fh,
|
(wrote = GNUNET_DISK_file_write (fh,
|
||||||
priv_enc,
|
priv_enc,
|
||||||
priv_enc_size)))
|
priv_enc_size)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (wrote != priv_enc_size)
|
if (wrote != (ssize_t) priv_enc_size)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
ret = GNUNET_OK;
|
ret = GNUNET_OK;
|
||||||
cleanup:
|
cleanup:
|
||||||
|
@ -36,6 +36,7 @@ common_free_reserve_history (void *cls,
|
|||||||
struct TALER_EXCHANGEDB_ReserveHistory *backref;
|
struct TALER_EXCHANGEDB_ReserveHistory *backref;
|
||||||
struct TALER_EXCHANGEDB_ClosingTransfer *closing;
|
struct TALER_EXCHANGEDB_ClosingTransfer *closing;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
while (NULL != rh)
|
while (NULL != rh)
|
||||||
{
|
{
|
||||||
switch (rh->type)
|
switch (rh->type)
|
||||||
@ -81,6 +82,7 @@ common_free_coin_transaction_list (void *cls,
|
|||||||
{
|
{
|
||||||
struct TALER_EXCHANGEDB_TransactionList *next;
|
struct TALER_EXCHANGEDB_TransactionList *next;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
while (NULL != list)
|
while (NULL != list)
|
||||||
{
|
{
|
||||||
next = list->next;
|
next = list->next;
|
||||||
|
@ -1735,6 +1735,7 @@ postgres_start (void *cls,
|
|||||||
GNUNET_PQ_EXECUTE_STATEMENT_END
|
GNUNET_PQ_EXECUTE_STATEMENT_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
||||||
"Starting transaction on %p\n",
|
"Starting transaction on %p\n",
|
||||||
session->conn);
|
session->conn);
|
||||||
@ -1767,6 +1768,7 @@ postgres_rollback (void *cls,
|
|||||||
GNUNET_PQ_EXECUTE_STATEMENT_END
|
GNUNET_PQ_EXECUTE_STATEMENT_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
||||||
"Rolling back transaction on %p\n",
|
"Rolling back transaction on %p\n",
|
||||||
session->conn);
|
session->conn);
|
||||||
@ -1793,6 +1795,7 @@ postgres_commit (void *cls,
|
|||||||
};
|
};
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
qs = GNUNET_PQ_eval_prepared_non_select (session->conn,
|
qs = GNUNET_PQ_eval_prepared_non_select (session->conn,
|
||||||
"do_commit",
|
"do_commit",
|
||||||
params);
|
params);
|
||||||
@ -1818,6 +1821,7 @@ postgres_preflight (void *cls,
|
|||||||
GNUNET_PQ_EXECUTE_STATEMENT_END
|
GNUNET_PQ_EXECUTE_STATEMENT_END
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
if (NULL == session->transaction_name)
|
if (NULL == session->transaction_name)
|
||||||
return; /* all good */
|
return; /* all good */
|
||||||
if (GNUNET_OK ==
|
if (GNUNET_OK ==
|
||||||
@ -1874,6 +1878,7 @@ postgres_insert_denomination_info (void *cls,
|
|||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
/* check fees match coin currency */
|
/* check fees match coin currency */
|
||||||
GNUNET_assert (GNUNET_YES ==
|
GNUNET_assert (GNUNET_YES ==
|
||||||
TALER_amount_cmp_currency_nbo (&issue->properties.value,
|
TALER_amount_cmp_currency_nbo (&issue->properties.value,
|
||||||
@ -2137,6 +2142,7 @@ reserves_update (void *cls,
|
|||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
||||||
"reserve_update",
|
"reserve_update",
|
||||||
params);
|
params);
|
||||||
@ -2335,6 +2341,7 @@ postgres_get_latest_reserve_in_reference (void *cls,
|
|||||||
GNUNET_PQ_result_spec_end
|
GNUNET_PQ_result_spec_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
||||||
"reserves_in_get_latest_wire_reference",
|
"reserves_in_get_latest_wire_reference",
|
||||||
params,
|
params,
|
||||||
@ -2957,6 +2964,7 @@ postgres_mark_deposit_tiny (void *cls,
|
|||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
||||||
"mark_deposit_tiny",
|
"mark_deposit_tiny",
|
||||||
params);
|
params);
|
||||||
@ -2994,6 +3002,7 @@ postgres_test_deposit_done (void *cls,
|
|||||||
};
|
};
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
qs = GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
qs = GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
||||||
"test_deposit_done",
|
"test_deposit_done",
|
||||||
params,
|
params,
|
||||||
@ -3028,6 +3037,7 @@ postgres_mark_deposit_done (void *cls,
|
|||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
||||||
"mark_deposit_done",
|
"mark_deposit_done",
|
||||||
params);
|
params);
|
||||||
@ -3346,6 +3356,7 @@ insert_known_coin (void *cls,
|
|||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
|
||||||
"Creating known coin %s\n",
|
"Creating known coin %s\n",
|
||||||
TALER_B2S (&coin_info->coin_pub));
|
TALER_B2S (&coin_info->coin_pub));
|
||||||
@ -3380,6 +3391,7 @@ postgres_count_known_coins (void *cls,
|
|||||||
};
|
};
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
qs = GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
qs = GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
||||||
"count_known_coins",
|
"count_known_coins",
|
||||||
params,
|
params,
|
||||||
@ -3473,14 +3485,7 @@ postgres_insert_deposit (void *cls,
|
|||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
#if 0
|
(void) cls;
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
|
||||||
|
|
||||||
if (0 > (qs = postgres_ensure_coin_known (cls,
|
|
||||||
session,
|
|
||||||
&deposit->coin)))
|
|
||||||
return qs;
|
|
||||||
#endif
|
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
|
||||||
"Inserting deposit to be executed at %s (%llu/%llu)\n",
|
"Inserting deposit to be executed at %s (%llu/%llu)\n",
|
||||||
GNUNET_STRINGS_absolute_time_to_string (deposit->wire_deadline),
|
GNUNET_STRINGS_absolute_time_to_string (deposit->wire_deadline),
|
||||||
@ -3515,6 +3520,7 @@ postgres_insert_refund (void *cls,
|
|||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
GNUNET_assert (GNUNET_YES ==
|
GNUNET_assert (GNUNET_YES ==
|
||||||
TALER_amount_cmp_currency (&refund->refund_amount,
|
TALER_amount_cmp_currency (&refund->refund_amount,
|
||||||
&refund->refund_fee));
|
&refund->refund_fee));
|
||||||
@ -3733,6 +3739,7 @@ postgres_get_melt_index (void *cls,
|
|||||||
GNUNET_PQ_result_spec_end
|
GNUNET_PQ_result_spec_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
||||||
"get_melt_index",
|
"get_melt_index",
|
||||||
params,
|
params,
|
||||||
@ -3762,14 +3769,8 @@ postgres_insert_melt (void *cls,
|
|||||||
GNUNET_PQ_query_param_uint32 (&refresh_session->noreveal_index),
|
GNUNET_PQ_query_param_uint32 (&refresh_session->noreveal_index),
|
||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
#if 0
|
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
|
||||||
|
|
||||||
if (0 > (qs = postgres_ensure_coin_known (cls,
|
(void) cls;
|
||||||
session,
|
|
||||||
&refresh_session->coin)))
|
|
||||||
return qs;
|
|
||||||
#endif
|
|
||||||
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
||||||
"insert_melt",
|
"insert_melt",
|
||||||
params);
|
params);
|
||||||
@ -3803,6 +3804,7 @@ postgres_insert_refresh_reveal (void *cls,
|
|||||||
const struct TALER_TransferPrivateKeyP *tprivs,
|
const struct TALER_TransferPrivateKeyP *tprivs,
|
||||||
const struct TALER_TransferPublicKeyP *tp)
|
const struct TALER_TransferPublicKeyP *tp)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
if (TALER_CNC_KAPPA != num_tprivs + 1)
|
if (TALER_CNC_KAPPA != num_tprivs + 1)
|
||||||
{
|
{
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
@ -3972,6 +3974,7 @@ postgres_get_refresh_reveal (void *cls,
|
|||||||
GNUNET_PQ_result_spec_end
|
GNUNET_PQ_result_spec_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
/* First get the coins */
|
/* First get the coins */
|
||||||
memset (&grctx,
|
memset (&grctx,
|
||||||
0,
|
0,
|
||||||
@ -4098,6 +4101,7 @@ free_link_data_list (void *cls,
|
|||||||
{
|
{
|
||||||
struct TALER_EXCHANGEDB_LinkDataList *next;
|
struct TALER_EXCHANGEDB_LinkDataList *next;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
while (NULL != ldl)
|
while (NULL != ldl)
|
||||||
{
|
{
|
||||||
next = ldl->next;
|
next = ldl->next;
|
||||||
@ -5090,6 +5094,7 @@ postgres_insert_aggregation_tracking (void *cls,
|
|||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
||||||
"insert_aggregation_tracking",
|
"insert_aggregation_tracking",
|
||||||
params);
|
params);
|
||||||
@ -5456,6 +5461,7 @@ postgres_wire_prepare_data_insert (void *cls,
|
|||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
||||||
"wire_prepare_data_insert",
|
"wire_prepare_data_insert",
|
||||||
params);
|
params);
|
||||||
@ -5481,6 +5487,7 @@ postgres_wire_prepare_data_mark_finished (void *cls,
|
|||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
||||||
"wire_prepare_data_mark_done",
|
"wire_prepare_data_mark_done",
|
||||||
params);
|
params);
|
||||||
@ -5522,6 +5529,7 @@ postgres_wire_prepare_data_get (void *cls,
|
|||||||
GNUNET_PQ_result_spec_end
|
GNUNET_PQ_result_spec_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
qs = GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
qs = GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
||||||
"wire_prepare_data_get",
|
"wire_prepare_data_get",
|
||||||
params,
|
params,
|
||||||
@ -5610,6 +5618,7 @@ postgres_store_wire_transfer_out (void *cls,
|
|||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
||||||
"insert_wire_out",
|
"insert_wire_out",
|
||||||
params);
|
params);
|
||||||
@ -7231,6 +7240,7 @@ postgres_insert_payback_refresh_request (void *cls,
|
|||||||
};
|
};
|
||||||
enum GNUNET_DB_QueryStatus qs;
|
enum GNUNET_DB_QueryStatus qs;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
/* now store actual payback information */
|
/* now store actual payback information */
|
||||||
qs = GNUNET_PQ_eval_prepared_non_select (session->conn,
|
qs = GNUNET_PQ_eval_prepared_non_select (session->conn,
|
||||||
"payback_refresh_insert",
|
"payback_refresh_insert",
|
||||||
@ -7270,6 +7280,7 @@ postgres_get_reserve_by_h_blind (void *cls,
|
|||||||
GNUNET_PQ_result_spec_end
|
GNUNET_PQ_result_spec_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
||||||
"reserve_by_h_blind",
|
"reserve_by_h_blind",
|
||||||
params,
|
params,
|
||||||
@ -7303,6 +7314,7 @@ postgres_get_old_coin_by_h_blind (void *cls,
|
|||||||
GNUNET_PQ_result_spec_end
|
GNUNET_PQ_result_spec_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
||||||
"old_coin_by_h_blind",
|
"old_coin_by_h_blind",
|
||||||
params,
|
params,
|
||||||
@ -7335,6 +7347,7 @@ postgres_insert_denomination_revocation (void *cls,
|
|||||||
GNUNET_PQ_query_param_end
|
GNUNET_PQ_query_param_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
return GNUNET_PQ_eval_prepared_non_select (session->conn,
|
||||||
"denomination_revocation_insert",
|
"denomination_revocation_insert",
|
||||||
params);
|
params);
|
||||||
@ -7370,6 +7383,7 @@ postgres_get_denomination_revocation (void *cls,
|
|||||||
GNUNET_PQ_result_spec_end
|
GNUNET_PQ_result_spec_end
|
||||||
};
|
};
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
return GNUNET_PQ_eval_prepared_singleton_select (session->conn,
|
||||||
"denomination_revocation_get",
|
"denomination_revocation_get",
|
||||||
params,
|
params,
|
||||||
|
@ -108,13 +108,12 @@ TALER_TESTING_has_in_name (const char *prog,
|
|||||||
* operation.
|
* operation.
|
||||||
* @param account_no bank account number to ask the history for.
|
* @param account_no bank account number to ask the history for.
|
||||||
* @param direction which direction this operation is interested
|
* @param direction which direction this operation is interested
|
||||||
* @param ascending if GNUNET_YES, it ask the bank to return results
|
* @param ascending if #GNUNET_YES, it ask the bank to return results
|
||||||
* in chronological order.
|
* in chronological order.
|
||||||
* @param start_row_reference reference to a command that can
|
* @param start_row_reference reference to a command that can
|
||||||
* offer a row identifier, to be used as the starting row
|
* offer a row identifier, to be used as the starting row
|
||||||
* to accept in the result.
|
* to accept in the result.
|
||||||
* @param num_result how many rows we want in the result.
|
* @param num_results how many rows we want in the result.
|
||||||
*
|
|
||||||
* @return the command.
|
* @return the command.
|
||||||
*/
|
*/
|
||||||
struct TALER_TESTING_Command
|
struct TALER_TESTING_Command
|
||||||
@ -124,7 +123,7 @@ TALER_TESTING_cmd_bank_history (const char *label,
|
|||||||
enum TALER_BANK_Direction direction,
|
enum TALER_BANK_Direction direction,
|
||||||
unsigned int ascending,
|
unsigned int ascending,
|
||||||
const char *start_row_reference,
|
const char *start_row_reference,
|
||||||
long long num_results);
|
unsigned long long num_results);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -132,6 +132,14 @@ ebics_prepare_wire_transfer (void *cls,
|
|||||||
TALER_WIRE_PrepareTransactionCallback psc,
|
TALER_WIRE_PrepareTransactionCallback psc,
|
||||||
void *psc_cls)
|
void *psc_cls)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) origin_account_section;
|
||||||
|
(void) destination_account_url;
|
||||||
|
(void) amount;
|
||||||
|
(void) exchange_base_url;
|
||||||
|
(void) wtid;
|
||||||
|
(void) psc;
|
||||||
|
(void) psc_cls;
|
||||||
GNUNET_break (0); // FIXME: not implemented
|
GNUNET_break (0); // FIXME: not implemented
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -148,6 +156,8 @@ static void
|
|||||||
ebics_prepare_wire_transfer_cancel (void *cls,
|
ebics_prepare_wire_transfer_cancel (void *cls,
|
||||||
struct TALER_WIRE_PrepareHandle *pth)
|
struct TALER_WIRE_PrepareHandle *pth)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) pth;
|
||||||
GNUNET_break (0); // FIXME: not implemented
|
GNUNET_break (0); // FIXME: not implemented
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,6 +179,11 @@ ebics_execute_wire_transfer (void *cls,
|
|||||||
TALER_WIRE_ConfirmationCallback cc,
|
TALER_WIRE_ConfirmationCallback cc,
|
||||||
void *cc_cls)
|
void *cc_cls)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) buf;
|
||||||
|
(void) buf_size;
|
||||||
|
(void) cc;
|
||||||
|
(void) cc_cls;
|
||||||
GNUNET_break (0); // FIXME: not implemented
|
GNUNET_break (0); // FIXME: not implemented
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -190,6 +205,8 @@ static void
|
|||||||
ebics_execute_wire_transfer_cancel (void *cls,
|
ebics_execute_wire_transfer_cancel (void *cls,
|
||||||
struct TALER_WIRE_ExecuteHandle *eh)
|
struct TALER_WIRE_ExecuteHandle *eh)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) eh;
|
||||||
GNUNET_break (0); // FIXME: not implemented
|
GNUNET_break (0); // FIXME: not implemented
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,6 +243,14 @@ ebics_get_history (void *cls,
|
|||||||
TALER_WIRE_HistoryResultCallback hres_cb,
|
TALER_WIRE_HistoryResultCallback hres_cb,
|
||||||
void *hres_cb_cls)
|
void *hres_cb_cls)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) account_section;
|
||||||
|
(void) direction;
|
||||||
|
(void) start_off;
|
||||||
|
(void) start_off_len;
|
||||||
|
(void) num_results;
|
||||||
|
(void) hres_cb;
|
||||||
|
(void) hres_cb_cls;
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -241,6 +266,8 @@ static void
|
|||||||
ebics_get_history_cancel (void *cls,
|
ebics_get_history_cancel (void *cls,
|
||||||
struct TALER_WIRE_HistoryHandle *whh)
|
struct TALER_WIRE_HistoryHandle *whh)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) whh;
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,6 +342,11 @@ ebics_reject_transfer (void *cls,
|
|||||||
{
|
{
|
||||||
struct TALER_WIRE_RejectHandle *rh;
|
struct TALER_WIRE_RejectHandle *rh;
|
||||||
|
|
||||||
|
(void) account_section;
|
||||||
|
(void) start_off;
|
||||||
|
(void) start_off_len;
|
||||||
|
(void) rej_cb;
|
||||||
|
(void) rej_cb_cls;
|
||||||
GNUNET_break (0); /* not implemented, just a stub! */
|
GNUNET_break (0); /* not implemented, just a stub! */
|
||||||
rh = GNUNET_new (struct TALER_WIRE_RejectHandle);
|
rh = GNUNET_new (struct TALER_WIRE_RejectHandle);
|
||||||
rh->rej_cb = rej_cb;
|
rh->rej_cb = rej_cb;
|
||||||
@ -343,6 +375,7 @@ ebics_reject_transfer_cancel (void *cls,
|
|||||||
{
|
{
|
||||||
void *ret = rh->rej_cb_cls;
|
void *ret = rh->rej_cb_cls;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
GNUNET_SCHEDULER_cancel (rh->timeout_task);
|
GNUNET_SCHEDULER_cancel (rh->timeout_task);
|
||||||
GNUNET_free (rh);
|
GNUNET_free (rh);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -84,6 +84,8 @@ static enum TALER_ErrorCode
|
|||||||
template_wire_validate (void *cls,
|
template_wire_validate (void *cls,
|
||||||
const char *account_url)
|
const char *account_url)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) account_url;
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
return TALER_EC_NOT_IMPLEMENTED;
|
return TALER_EC_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
@ -114,6 +116,14 @@ template_prepare_wire_transfer (void *cls,
|
|||||||
TALER_WIRE_PrepareTransactionCallback ptc,
|
TALER_WIRE_PrepareTransactionCallback ptc,
|
||||||
void *ptc_cls)
|
void *ptc_cls)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) origin_account_section;
|
||||||
|
(void) destination_account_url;
|
||||||
|
(void) amount;
|
||||||
|
(void) exchange_base_url;
|
||||||
|
(void) wtid;
|
||||||
|
(void) ptc;
|
||||||
|
(void) ptc_cls;
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -130,6 +140,8 @@ static void
|
|||||||
template_prepare_wire_transfer_cancel (void *cls,
|
template_prepare_wire_transfer_cancel (void *cls,
|
||||||
struct TALER_WIRE_PrepareHandle *pth)
|
struct TALER_WIRE_PrepareHandle *pth)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) pth;
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,6 +163,11 @@ template_execute_wire_transfer (void *cls,
|
|||||||
TALER_WIRE_ConfirmationCallback cc,
|
TALER_WIRE_ConfirmationCallback cc,
|
||||||
void *cc_cls)
|
void *cc_cls)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) buf;
|
||||||
|
(void) buf_size;
|
||||||
|
(void) cc;
|
||||||
|
(void) cc_cls;
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -172,6 +189,8 @@ static void
|
|||||||
template_execute_wire_transfer_cancel (void *cls,
|
template_execute_wire_transfer_cancel (void *cls,
|
||||||
struct TALER_WIRE_ExecuteHandle *eh)
|
struct TALER_WIRE_ExecuteHandle *eh)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) eh;
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,6 +227,14 @@ template_get_history (void *cls,
|
|||||||
TALER_WIRE_HistoryResultCallback hres_cb,
|
TALER_WIRE_HistoryResultCallback hres_cb,
|
||||||
void *hres_cb_cls)
|
void *hres_cb_cls)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) account_section;
|
||||||
|
(void) direction;
|
||||||
|
(void) start_off;
|
||||||
|
(void) start_off_len;
|
||||||
|
(void) num_results;
|
||||||
|
(void) hres_cb;
|
||||||
|
(void) hres_cb_cls;
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -223,6 +250,8 @@ static void
|
|||||||
template_get_history_cancel (void *cls,
|
template_get_history_cancel (void *cls,
|
||||||
struct TALER_WIRE_HistoryHandle *whh)
|
struct TALER_WIRE_HistoryHandle *whh)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) whh;
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,6 +283,12 @@ template_reject_transfer (void *cls,
|
|||||||
TALER_WIRE_RejectTransferCallback rej_cb,
|
TALER_WIRE_RejectTransferCallback rej_cb,
|
||||||
void *rej_cb_cls)
|
void *rej_cb_cls)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) account_section;
|
||||||
|
(void) start_off;
|
||||||
|
(void) start_off_len;
|
||||||
|
(void) rej_cb;
|
||||||
|
(void) rej_cb_cls;
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -275,6 +310,8 @@ static void *
|
|||||||
template_reject_transfer_cancel (void *cls,
|
template_reject_transfer_cancel (void *cls,
|
||||||
struct TALER_WIRE_RejectHandle *rh)
|
struct TALER_WIRE_RejectHandle *rh)
|
||||||
{
|
{
|
||||||
|
(void) cls;
|
||||||
|
(void) rh;
|
||||||
GNUNET_break (0);
|
GNUNET_break (0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user