anastasis

Credential backup and recovery protocol and service
Log | Files | Refs | Submodules | README | LICENSE

commit 6dac69c96aaf84c32802ac8140101df3b8dea60d
parent 7e4bfbf1c17a5faf04b94e7db04e5536617a4a92
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 23 Aug 2021 00:17:58 +0200

adjust to latest GNUnet API changes

Diffstat:
Msrc/authorization/anastasis_authorization_plugin_iban.c | 2++
Msrc/include/anastasis_database_plugin.h | 2++
Msrc/stasis/plugin_anastasis_postgres.c | 5+++--
3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/authorization/anastasis_authorization_plugin_iban.c b/src/authorization/anastasis_authorization_plugin_iban.c @@ -514,6 +514,8 @@ iban_process (struct ANASTASIS_AUTHORIZATION_State *as, &espec.debit_iban_hash); as->eh = ctx->ac->db->event_listen (ctx->ac->db->cls, &espec.header, + GNUNET_TIME_absolute_get_remaining ( + timeout), &bank_event_cb, as); } diff --git a/src/include/anastasis_database_plugin.h b/src/include/anastasis_database_plugin.h @@ -262,6 +262,7 @@ struct ANASTASIS_DatabasePlugin * * @param cls database context to use * @param es specification of the event to listen for + * @param timeout how long to wait for the event * @param cb function to call when the event happens, possibly * multiple times (until cancel is invoked) * @param cb_cls closure for @a cb @@ -270,6 +271,7 @@ struct ANASTASIS_DatabasePlugin struct GNUNET_DB_EventHandler * (*event_listen)(void *cls, const struct GNUNET_DB_EventHeaderP *es, + struct GNUNET_TIME_Relative timeout, GNUNET_DB_EventCallback cb, void *cb_cls); diff --git a/src/stasis/plugin_anastasis_postgres.c b/src/stasis/plugin_anastasis_postgres.c @@ -230,6 +230,7 @@ commit_transaction (void *cls) * * @param cls database context to use * @param es specification of the event to listen for + * @param timeout how long to wait for the event * @param cb function to call when the event happens, possibly * multiple times (until cancel is invoked) * @param cb_cls closure for @a cb @@ -238,6 +239,7 @@ commit_transaction (void *cls) static struct GNUNET_DB_EventHandler * postgres_event_listen (void *cls, const struct GNUNET_DB_EventHeaderP *es, + struct GNUNET_TIME_Relative timeout, GNUNET_DB_EventCallback cb, void *cb_cls) { @@ -245,6 +247,7 @@ postgres_event_listen (void *cls, return GNUNET_PQ_event_listen (pg->conn, es, + timeout, cb, cb_cls); } @@ -2635,7 +2638,6 @@ libanastasis_plugin_db_postgres_init (void *cls) GNUNET_free (pg); return NULL; } - GNUNET_PQ_event_scheduler_start (pg->conn); plugin = GNUNET_new (struct ANASTASIS_DatabasePlugin); plugin->cls = pg; plugin->drop_tables = &postgres_drop_tables; @@ -2694,7 +2696,6 @@ libanastasis_plugin_db_postgres_done (void *cls) struct ANASTASIS_DatabasePlugin *plugin = cls; struct PostgresClosure *pg = plugin->cls; - GNUNET_PQ_event_scheduler_stop (pg->conn); GNUNET_PQ_disconnect (pg->conn); GNUNET_free (pg->currency); GNUNET_free (pg);