diff options
Diffstat (limited to 'src/auditor/taler-auditor-httpd_row-inconsistency-get.c')
-rw-r--r-- | src/auditor/taler-auditor-httpd_row-inconsistency-get.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/src/auditor/taler-auditor-httpd_row-inconsistency-get.c b/src/auditor/taler-auditor-httpd_row-inconsistency-get.c index f1120b674..05bd21280 100644 --- a/src/auditor/taler-auditor-httpd_row-inconsistency-get.c +++ b/src/auditor/taler-auditor-httpd_row-inconsistency-get.c @@ -13,8 +13,6 @@ You should have received a copy of the GNU General Public License along with TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ - - #include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_json_lib.h> @@ -24,9 +22,9 @@ #include "taler_json_lib.h" #include "taler_mhd_lib.h" #include "taler-auditor-httpd.h" - #include "taler-auditor-httpd_row-inconsistency-get.h" + /** * Add deposit confirmation to the list. * @@ -57,7 +55,6 @@ add_row_inconsistency ( GNUNET_break (0 == json_array_append_new (list, obj)); - return GNUNET_OK; } @@ -73,6 +70,9 @@ TAH_ROW_INCONSISTENCY_handler_get ( { json_t *ja; enum GNUNET_DB_QueryStatus qs; + int64_t limit = -20; + uint64_t offset; + bool return_suppressed = false; (void) rh; (void) connection_cls; @@ -87,34 +87,28 @@ TAH_ROW_INCONSISTENCY_handler_get ( TALER_EC_GENERIC_DB_SETUP_FAILED, NULL); } - ja = json_array (); - GNUNET_break (NULL != ja); - - int64_t limit = -20; - uint64_t offset; - TALER_MHD_parse_request_snumber (connection, "limit", &limit); - if (limit < 0) offset = INT64_MAX; else offset = 0; - TALER_MHD_parse_request_number (connection, "offset", &offset); - - bool return_suppressed = false; - const char *ret_s = MHD_lookup_connection_value (connection, - MHD_GET_ARGUMENT_KIND, - "return_suppressed"); - if (ret_s != NULL && strcmp (ret_s, "true") == 0) { - return_suppressed = true; + const char *ret_s = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "return_suppressed"); + if (ret_s != NULL && strcmp (ret_s, "true") == 0) + { + return_suppressed = true; + } } + ja = json_array (); + GNUNET_break (NULL != ja); qs = TAH_plugin->get_row_inconsistency ( TAH_plugin->cls, limit, @@ -122,7 +116,6 @@ TAH_ROW_INCONSISTENCY_handler_get ( return_suppressed, &add_row_inconsistency, ja); - if (0 > qs) { GNUNET_break (GNUNET_DB_STATUS_HARD_ERROR == qs); |