summaryrefslogtreecommitdiff
path: root/src/auditor/taler-auditor-httpd_deposit-confirmation.c
diff options
context:
space:
mode:
authorNic Eigel <nic@eigel.ch>2024-01-16 22:37:07 +0100
committerNic Eigel <nic@eigel.ch>2024-01-16 22:37:07 +0100
commit45b110edb2b4fd39c56f433c5c0a7f93cd29d4da (patch)
tree3ce6145e8ea7f67daaa1af55b3651002021167fd /src/auditor/taler-auditor-httpd_deposit-confirmation.c
parent510d4fc5234e8e17d73e8d95a0dc66ad37c03fef (diff)
downloadexchange-45b110edb2b4fd39c56f433c5c0a7f93cd29d4da.tar.gz
exchange-45b110edb2b4fd39c56f433c5c0a7f93cd29d4da.tar.bz2
exchange-45b110edb2b4fd39c56f433c5c0a7f93cd29d4da.zip
progress on auditor helpers
Diffstat (limited to 'src/auditor/taler-auditor-httpd_deposit-confirmation.c')
-rw-r--r--src/auditor/taler-auditor-httpd_deposit-confirmation.c98
1 files changed, 0 insertions, 98 deletions
diff --git a/src/auditor/taler-auditor-httpd_deposit-confirmation.c b/src/auditor/taler-auditor-httpd_deposit-confirmation.c
index 2631c6f58..10243eafc 100644
--- a/src/auditor/taler-auditor-httpd_deposit-confirmation.c
+++ b/src/auditor/taler-auditor-httpd_deposit-confirmation.c
@@ -453,101 +453,3 @@ TEAH_DEPOSIT_CONFIRMATION_done (void)
GNUNET_assert (0 == pthread_mutex_destroy (&lock));
}
}
-
-
-/**
- * Add deposit confirmation to the list.
- *
- * @param[in,out] cls a `json_t *` array to extend
- * @param serial_id location of the @a dc in the database
- * @param dc struct of deposit confirmation
- * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop iterating
- */
-static enum GNUNET_GenericReturnValue
-add_deposit_confirmation (void *cls,
- uint64_t serial_id,
- const struct TALER_AUDITORDB_DepositConfirmation *dc)
-{
- json_t *list = cls;
- json_t *obj;
-
- obj = GNUNET_JSON_PACK (
- GNUNET_JSON_pack_data_auto ("dc",
- dc));
- GNUNET_break (0 ==
- json_array_append_new (list,
- obj));
- return GNUNET_OK;
-}
-
-
-/**
- *
- * @param rh context of the handler
- * @param connection the MHD connection to handle
- * @param[in,out] connection_cls the connection's closure (can be updated)
- * @param upload_data upload data
- * @param[in,out] upload_data_size number of bytes (left) in @a upload_data
- * @return MHD result code
- */
-MHD_RESULT
-TAH_DEPOSIT_CONFIRMATION_get (struct TAH_RequestHandler *rh,
- struct MHD_Connection *connection,
- void **connection_cls,
- const char *upload_data,
- size_t *upload_data_size)
-{
- json_t *ja;
- enum GNUNET_DB_QueryStatus qs;
-
- (void) rh;
- (void) connection_cls;
- (void) upload_data;
- (void) upload_data_size;
- if (GNUNET_SYSERR ==
- TAH_plugin->preflight (TAH_plugin->cls))
- {
- GNUNET_break (0);
- return TALER_MHD_reply_with_error (connection,
- MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_GENERIC_DB_SETUP_FAILED,
- NULL);
- }
- ja = json_array ();
- GNUNET_break (NULL != ja);
- // TODO correct below
- struct TALER_AUDITORDB_ProgressPointDepositConfirmation ppdc = { 0 }; // FIXME: initialize...
-
- qs = TAH_plugin->get_deposit_confirmations (
- TAH_plugin->cls,
- NULL, /* FIXME: master-public key to be removed! */
- ppdc.last_deposit_confirmation_serial_id,
- &add_deposit_confirmation,
- ja);
-
- if (0 > qs)
- {
- GNUNET_break (GNUNET_DB_STATUS_HARD_ERROR == qs);
- json_decref (ja);
- TALER_LOG_WARNING (
- "Failed to handle GET /deposit-confirmation in database\n");
- return TALER_MHD_reply_with_error (connection,
- MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_GENERIC_DB_FETCH_FAILED,
- "deposit-confirmation");
- }
- return TALER_MHD_REPLY_JSON_PACK (
- connection,
- MHD_HTTP_OK,
- GNUNET_JSON_pack_array_steal ("deposit-confirmation",
- ja));
-}
-
-
-/*MHD_RESULT
-TAH_DEPOSIT_CONFIRMATION_delete(struct TEH_RequestContext *rc,
- const char *const args[1]) {
-}*/
-
-
-/* end of taler-auditor-httpd_deposit-confirmation.c */