summaryrefslogtreecommitdiff
path: root/src/sync/sync-httpd.c
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2021-09-08 17:09:30 +0200
committerChristian Grothoff <grothoff@gnunet.org>2021-09-08 17:09:30 +0200
commit52ed41d588082f2097473b1440fcc314a79dc4c4 (patch)
tree6057d3f531c5cb22b83ba14455503c1a0c75f7ae /src/sync/sync-httpd.c
parent1bc2346a56d486a3557cf524fb38e971b854e6ee (diff)
downloadsync-52ed41d588082f2097473b1440fcc314a79dc4c4.tar.gz
sync-52ed41d588082f2097473b1440fcc314a79dc4c4.tar.bz2
sync-52ed41d588082f2097473b1440fcc314a79dc4c4.zip
add liability limit to sync /config
Diffstat (limited to 'src/sync/sync-httpd.c')
-rw-r--r--src/sync/sync-httpd.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/sync/sync-httpd.c b/src/sync/sync-httpd.c
index 3e13c31..0ec95e7 100644
--- a/src/sync/sync-httpd.c
+++ b/src/sync/sync-httpd.c
@@ -120,6 +120,11 @@ static char *apikey;
*/
static char *keypass;
+/**
+ * Amount of insurance.
+ */
+struct TALER_Amount SH_insurance;
+
/**
* A client has requested the given url using the given method
@@ -557,6 +562,18 @@ run (void *cls,
if (GNUNET_OK !=
TALER_config_get_amount (config,
"sync",
+ "INSURANCE",
+ &SH_insurance))
+ {
+ GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+ "sync",
+ "INSURANCE");
+ GNUNET_SCHEDULER_shutdown ();
+ return;
+ }
+ if (GNUNET_OK !=
+ TALER_config_get_amount (config,
+ "sync",
"ANNUAL_FEE",
&SH_annual_fee))
{