aboutsummaryrefslogtreecommitdiff
path: root/src/mint
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-01-21 15:18:55 +0100
committerChristian Grothoff <christian@grothoff.org>2016-01-21 15:18:55 +0100
commitd63447baf65bd1578f51595cc8e673f3312f8044 (patch)
treee4cc779182ebdf4989654398ad37a77c4a9a6364 /src/mint
parentce199e6e9590a4290c11cdbc1b40600f74ac41e6 (diff)
adding mint-lib logic to execute /wire/deposits requests
Diffstat (limited to 'src/mint')
-rw-r--r--src/mint/taler-mint-httpd_db.c4
-rw-r--r--src/mint/taler-mint-httpd_db.h2
-rw-r--r--src/mint/taler-mint-httpd_tracking.c9
3 files changed, 5 insertions, 10 deletions
diff --git a/src/mint/taler-mint-httpd_db.c b/src/mint/taler-mint-httpd_db.c
index fb4ee1b7a..19c213988 100644
--- a/src/mint/taler-mint-httpd_db.c
+++ b/src/mint/taler-mint-httpd_db.c
@@ -1704,7 +1704,7 @@ handle_transaction_data (void *cls,
*/
int
TMH_DB_execute_wire_deposits (struct MHD_Connection *connection,
- const struct TALER_WireTransferIdentifierP *wtid)
+ const struct TALER_WireTransferIdentifierRawP *wtid)
{
int ret;
struct WtidTransactionContext ctx;
@@ -1720,7 +1720,7 @@ TMH_DB_execute_wire_deposits (struct MHD_Connection *connection,
ctx.deposits = json_array ();
ret = TMH_plugin->lookup_wire_transfer (TMH_plugin->cls,
session,
- &wtid->raw,
+ wtid,
&handle_transaction_data,
&ctx);
if (GNUNET_SYSERR == ret)
diff --git a/src/mint/taler-mint-httpd_db.h b/src/mint/taler-mint-httpd_db.h
index e366112dd..0327bef2a 100644
--- a/src/mint/taler-mint-httpd_db.h
+++ b/src/mint/taler-mint-httpd_db.h
@@ -202,7 +202,7 @@ TMH_DB_execute_admin_add_incoming (struct MHD_Connection *connection,
*/
int
TMH_DB_execute_wire_deposits (struct MHD_Connection *connection,
- const struct TALER_WireTransferIdentifierP *wtid);
+ const struct TALER_WireTransferIdentifierRawP *wtid);
/**
diff --git a/src/mint/taler-mint-httpd_tracking.c b/src/mint/taler-mint-httpd_tracking.c
index e61b4bae1..76293803d 100644
--- a/src/mint/taler-mint-httpd_tracking.c
+++ b/src/mint/taler-mint-httpd_tracking.c
@@ -46,22 +46,17 @@ TMH_TRACKING_handler_wire_deposits (struct TMH_RequestHandler *rh,
const char *upload_data,
size_t *upload_data_size)
{
- struct TALER_WireTransferIdentifierP wtid;
+ struct TALER_WireTransferIdentifierRawP wtid;
int res;
res = TMH_PARSE_mhd_request_arg_data (connection,
"wtid",
&wtid,
- sizeof (struct TALER_WireTransferIdentifierP));
+ sizeof (struct TALER_WireTransferIdentifierRawP));
if (GNUNET_SYSERR == res)
return MHD_NO; /* internal error */
if (GNUNET_NO == res)
return MHD_YES; /* parse error */
- if (wtid.crc8 !=
- GNUNET_CRYPTO_crc8_n (&wtid.raw,
- sizeof (wtid.raw)))
- return TMH_RESPONSE_reply_arg_invalid (connection,
- "wtid");
return TMH_DB_execute_wire_deposits (connection,
&wtid);
}