[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: -more work on #7222
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: -more work on #7222 |
Date: |
Wed, 13 Apr 2022 09:19:21 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new 3d27add -more work on #7222
3d27add is described below
commit 3d27addfb97a6d4f10eedecce8d707c5d18774b7
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Apr 13 09:19:19 2022 +0200
-more work on #7222
---
src/reducer/anastasis_api_backup_redux.c | 22 ++++++++++------------
src/reducer/anastasis_api_redux.c | 11 +++++------
2 files changed, 15 insertions(+), 18 deletions(-)
diff --git a/src/reducer/anastasis_api_backup_redux.c
b/src/reducer/anastasis_api_backup_redux.c
index 9a9b3ad..2e73587 100644
--- a/src/reducer/anastasis_api_backup_redux.c
+++ b/src/reducer/anastasis_api_backup_redux.c
@@ -1168,13 +1168,11 @@ provider_candidate (struct PolicyBuilder *pb,
json_object_foreach (pb->providers, url, pconfig)
{
- bool disabled = false;
+ const char *status;
uint32_t http_status = 0;
struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_mark_optional (
- GNUNET_JSON_spec_bool ("disabled",
- &disabled),
- NULL),
+ GNUNET_JSON_spec_string ("status",
+ &status),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_uint32 ("http_status",
&http_status),
@@ -1191,7 +1189,8 @@ provider_candidate (struct PolicyBuilder *pb,
continue;
}
if ( (MHD_HTTP_OK != http_status) ||
- disabled)
+ (0 == strcmp (status,
+ "disabled")) )
{
GNUNET_JSON_parse_free (spec);
continue;
@@ -2560,13 +2559,11 @@ update_expiration_cost (json_t *state,
off++;
{
struct TALER_Amount upload_cost;
- bool disabled = false;
+ const char *status;
uint32_t http_status = 0;
struct GNUNET_JSON_Specification pspec[] = {
- GNUNET_JSON_spec_mark_optional (
- GNUNET_JSON_spec_bool ("disabled",
- &disabled),
- NULL),
+ GNUNET_JSON_spec_string ("status",
+ &status),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_uint32 ("http_status",
&http_status),
@@ -2589,7 +2586,8 @@ update_expiration_cost (json_t *state,
return GNUNET_SYSERR;
}
if ( (MHD_HTTP_OK != http_status) ||
- disabled)
+ (0 != strcmp (status,
+ "ok")) )
{
GNUNET_break (0);
return GNUNET_SYSERR;
diff --git a/src/reducer/anastasis_api_redux.c
b/src/reducer/anastasis_api_redux.c
index b66eec3..b9d18ab 100644
--- a/src/reducer/anastasis_api_redux.c
+++ b/src/reducer/anastasis_api_redux.c
@@ -2034,13 +2034,11 @@ ANASTASIS_reducer_lookup_salt (
const json_t *aps;
const json_t *cfg;
uint32_t http_status = 0;
- bool disabled = false;
+ const char *status;
bool no_salt;
struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_mark_optional (
- GNUNET_JSON_spec_bool ("disabled",
- &disabled),
- NULL),
+ GNUNET_JSON_spec_string ("status",
+ &status),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_uint32 ("http_status",
&http_status),
@@ -2075,7 +2073,8 @@ ANASTASIS_reducer_lookup_salt (
GNUNET_break_op (0);
return GNUNET_NO;
}
- if (disabled)
+ if (0 == strcmp (status,
+ "disabled"))
return GNUNET_NO;
if (no_salt)
return GNUNET_NO;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-anastasis] branch master updated: -more work on #7222,
gnunet <=