diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-06-19 20:46:24 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-06-19 20:46:24 +0200 |
commit | 703c54a279af8441e1a1e686f71d26bcd69bfd7d (patch) | |
tree | 233f57e999224430f2844c6a01c7e1da07d63a86 /src/exchange/taler-exchange-httpd_db.c | |
parent | a0c66e79191ca4339ea91e74e3742ccd8bd515ab (diff) | |
download | exchange-703c54a279af8441e1a1e686f71d26bcd69bfd7d.tar.gz exchange-703c54a279af8441e1a1e686f71d26bcd69bfd7d.tar.bz2 exchange-703c54a279af8441e1a1e686f71d26bcd69bfd7d.zip |
fix #5010 for /track/transaction
Diffstat (limited to 'src/exchange/taler-exchange-httpd_db.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_db.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/exchange/taler-exchange-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c index bed2a7fb7..9871b7f34 100644 --- a/src/exchange/taler-exchange-httpd_db.c +++ b/src/exchange/taler-exchange-httpd_db.c @@ -1145,68 +1145,4 @@ TEH_DB_execute_refresh_link (struct MHD_Connection *connection, } -/** - * Add an incoming transaction to the database. Checks if the - * transaction is fresh (not a duplicate) and if so adds it to - * the database. - * - * @param connection the MHD connection to handle - * @param reserve_pub public key of the reserve - * @param amount amount to add to the reserve - * @param execution_time when did we receive the wire transfer - * @param sender_account_details which account send the funds - * @param transfer_details information that uniquely identifies the transfer - * @return MHD result code - */ -int -TEH_DB_execute_admin_add_incoming (struct MHD_Connection *connection, - const struct TALER_ReservePublicKeyP *reserve_pub, - const struct TALER_Amount *amount, - struct GNUNET_TIME_Absolute execution_time, - const json_t *sender_account_details, - const json_t *transfer_details) -{ - struct TALER_EXCHANGEDB_Session *session; - int ret; - void *json_str; - - if (NULL == (session = TEH_plugin->get_session (TEH_plugin->cls))) - { - GNUNET_break (0); - return TEH_RESPONSE_reply_internal_db_error (connection, - TALER_EC_DB_SETUP_FAILED); - } - json_str = json_dumps (transfer_details, - JSON_INDENT(2)); - if (NULL == json_str) - { - GNUNET_break (0); - return TEH_RESPONSE_reply_internal_db_error (connection, - TALER_EC_PARSER_OUT_OF_MEMORY); - } - ret = TEH_plugin->reserves_in_insert (TEH_plugin->cls, - session, - reserve_pub, - amount, - execution_time, - sender_account_details, - json_str, - strlen (json_str)); - free (json_str); - if (GNUNET_SYSERR == ret) - { - GNUNET_break (0); - return TEH_RESPONSE_reply_internal_db_error (connection, - TALER_EC_ADMIN_ADD_INCOMING_DB_STORE); - } - return TEH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_OK, - "{s:s}", - "status", - (GNUNET_OK == ret) - ? "NEW" - : "DUP"); -} - - /* end of taler-exchange-httpd_db.c */ |