diff options
Diffstat (limited to 'src/reducer/anastasis_api_backup_redux.c')
-rw-r--r-- | src/reducer/anastasis_api_backup_redux.c | 22 |
1 files changed, 10 insertions, 12 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; |