donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit 0c5f4e9a60b6c35253b8a0c8b40f692a95628631
parent f1754f583edfb043018dc79bd6f02e3548bfb05d
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
Date:   Tue,  9 Jan 2024 10:54:32 +0100

added missing dbinit logic

Diffstat:
Msrc/donau/donau-httpd.c | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/donau/donau-httpd.c b/src/donau/donau-httpd.c @@ -759,6 +759,23 @@ donau_serve_process_config (void) return GNUNET_SYSERR; } + for (unsigned int i = 0; i<MAX_DB_RETRIES; i++) + { + DH_plugin = DONAUDB_plugin_load (DH_cfg); + if (NULL != DH_plugin) + break; + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Failed to connect to DB, will try again %u times\n", + MAX_DB_RETRIES - i); + sleep (1); + } + if (NULL == DH_plugin) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Failed to initialize DB subsystem. Giving up.\n"); + return GNUNET_SYSERR; + } + return GNUNET_OK; }