diff options
author | Cedric Zwahlen <cedric.zwahlen@students.bfh.ch> | 2024-04-26 13:39:41 +0200 |
---|---|---|
committer | Cedric Zwahlen <cedric.zwahlen@students.bfh.ch> | 2024-04-26 13:39:41 +0200 |
commit | ebbf8f37ac3a15653c869d5d06173e8e9aa80ac7 (patch) | |
tree | fe80c2f3a2a7b25fbb572ac514cac97f2b0b0316 /src/auditor/taler-auditor-httpd_purses-get.c | |
parent | 3c8c43e0cae2bd3c151112e55ff7231e16809abe (diff) | |
download | exchange-ebbf8f37ac3a15653c869d5d06173e8e9aa80ac7.tar.gz exchange-ebbf8f37ac3a15653c869d5d06173e8e9aa80ac7.tar.bz2 exchange-ebbf8f37ac3a15653c869d5d06173e8e9aa80ac7.zip |
fix some bugs
Diffstat (limited to 'src/auditor/taler-auditor-httpd_purses-get.c')
-rw-r--r-- | src/auditor/taler-auditor-httpd_purses-get.c | 38 |
1 files changed, 5 insertions, 33 deletions
diff --git a/src/auditor/taler-auditor-httpd_purses-get.c b/src/auditor/taler-auditor-httpd_purses-get.c index 2ce236fc4..81b5e16a7 100644 --- a/src/auditor/taler-auditor-httpd_purses-get.c +++ b/src/auditor/taler-auditor-httpd_purses-get.c @@ -118,40 +118,12 @@ TAH_PURSES_handler_get (struct TAH_RequestHandler *rh, &offset); bool return_suppressed = false; - - struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_bool ("return_suppressed", &return_suppressed), - GNUNET_JSON_spec_end () - }; - - // read the input json - json_t *json_in; + const char *ret_s = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "return_suppressed"); + if (ret_s != NULL && strcmp (ret_s, "true") == 0) { - enum GNUNET_GenericReturnValue res; - - res = TALER_MHD_parse_post_json (connection, - connection_cls, - upload_data, - upload_data_size, - &json_in); - if (GNUNET_SYSERR == res) - return MHD_NO; - if ((GNUNET_NO == res) || - (NULL == json_in)) - return MHD_YES; - res = TALER_MHD_parse_json_data (connection, - json_in, - spec); - if (GNUNET_SYSERR == res) - { - json_decref (json_in); - return MHD_NO; /* hard failure */ - } - if (GNUNET_NO == res) - { - json_decref (json_in); - return MHD_YES; /* failure */ - } + return_suppressed = true; } qs = TAH_plugin->get_purses ( |