summaryrefslogtreecommitdiff
path: root/src/auditor
diff options
context:
space:
mode:
Diffstat (limited to 'src/auditor')
-rw-r--r--src/auditor/taler-auditor-httpd.c16
-rw-r--r--src/auditor/taler-auditor-httpd_amount-arithmetic-inconsistency-get.c3
-rw-r--r--src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-del.c3
-rw-r--r--src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c2
-rw-r--r--src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-put.c2
-rw-r--r--src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-put.h12
-rw-r--r--src/auditor/taler-auditor-httpd_row-inconsistency-put.c2
7 files changed, 26 insertions, 14 deletions
diff --git a/src/auditor/taler-auditor-httpd.c b/src/auditor/taler-auditor-httpd.c
index a7315094d..774cb2a8b 100644
--- a/src/auditor/taler-auditor-httpd.c
+++ b/src/auditor/taler-auditor-httpd.c
@@ -315,6 +315,22 @@ handle_mhd_request (void *cls,
NULL, 0,
&TAH_ROW_INCONSISTENCY_handler_delete, MHD_HTTP_OK },
+ { "/reserve-balance-insufficient-inconsistency", MHD_HTTP_METHOD_GET,
+ "application/json",
+ NULL, 0,
+ &TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_get,
+ MHD_HTTP_OK },
+ { "/reserve-balance-insufficient-inconsistency", MHD_HTTP_METHOD_PUT,
+ "application/json",
+ NULL, 0,
+ &TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_put,
+ MHD_HTTP_OK },
+ { "/reserve-balance-insufficient-inconsistency", MHD_HTTP_METHOD_DELETE,
+ "application/json",
+ NULL, 0,
+ &TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_delete,
+ MHD_HTTP_OK },
+
{ "/config", MHD_HTTP_METHOD_GET, "application/json",
NULL, 0,
&handle_config, MHD_HTTP_OK },
diff --git a/src/auditor/taler-auditor-httpd_amount-arithmetic-inconsistency-get.c b/src/auditor/taler-auditor-httpd_amount-arithmetic-inconsistency-get.c
index e61b4298d..ee9e709e3 100644
--- a/src/auditor/taler-auditor-httpd_amount-arithmetic-inconsistency-get.c
+++ b/src/auditor/taler-auditor-httpd_amount-arithmetic-inconsistency-get.c
@@ -32,7 +32,6 @@ add_amount_arithmetic_inconsistency (void *cls,
json_t *list = cls;
json_t *obj;
- printf ("checkpoint pg_3\n");
obj = GNUNET_JSON_PACK (
@@ -46,7 +45,6 @@ add_amount_arithmetic_inconsistency (void *cls,
json_array_append_new (list,
obj));
- printf ("checkpoint pg_4\n");
return GNUNET_OK;
}
@@ -133,7 +131,6 @@ TAH_AMOUNT_ARITHMETIC_INCONSISTENCY_handler_get (struct TAH_RequestHandler *rh,
}
}
- printf ("checkpoint httpd\n");
qs = TAH_plugin->get_amount_arithmetic_inconsistency (
TAH_plugin->cls,
diff --git a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-del.c b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-del.c
index 1f018cac9..f9fcd5e11 100644
--- a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-del.c
+++ b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-del.c
@@ -65,7 +65,7 @@ TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_delete (struct
TAH_plugin->cls,
row_id);
- if (0 > qs)
+ if (0 == qs)
{
// goes in here if there was an error with the transaction
GNUNET_break (GNUNET_DB_STATUS_HARD_ERROR == qs);
@@ -86,5 +86,4 @@ TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_delete (struct
GNUNET_JSON_pack_string ("status",
"RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_OK"));
- return res;
}
diff --git a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c
index 40ec4c9fe..799d47a87 100644
--- a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c
+++ b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-get.c
@@ -51,7 +51,7 @@ process_reserve_balance_insufficient_inconsistency (void *cls,
// GNUNET_JSON_pack_... ("", &dc->),
// TALER_JSON_pack_... ("", &dc->),
-
+ GNUNET_JSON_pack_uint64 ("row_id", serial_id),
GNUNET_JSON_pack_data_auto ("reserve_pub", &dc->reserve_pub),
GNUNET_JSON_pack_bool ("inconsistency_gain", dc->inconsistency_gain),
TALER_JSON_pack_amount ("inconsistency_amount", &dc->inconsistency_amount)
diff --git a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-put.c b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-put.c
index 47d664b1a..139753658 100644
--- a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-put.c
+++ b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-put.c
@@ -75,7 +75,7 @@ process_inconsistency (
MHD_RESULT
-TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_PUT_handler (
+TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_put (
struct TAH_RequestHandler *rh,
struct MHD_Connection *connection,
void **connection_cls,
diff --git a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-put.h b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-put.h
index b633a1cd0..eeead65d9 100644
--- a/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-put.h
+++ b/src/auditor/taler-auditor-httpd_reserve-balance-insufficient-inconsistency-put.h
@@ -15,8 +15,8 @@
*/
-#ifndef SRC_TALER_AUDITOR_HTTPD_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_GET_H
-#define SRC_TALER_AUDITOR_HTTPD_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_GET_H
+#ifndef SRC_TALER_AUDITOR_HTTPD_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_PUT_H
+#define SRC_TALER_AUDITOR_HTTPD_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_PUT_H
#include <gnunet/gnunet_util_lib.h>
#include <microhttpd.h>
@@ -26,13 +26,13 @@
* Initialize subsystem.
*/
void
-TEAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_GET_init (void);
+TEAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_PUT_init (void);
/**
* Shut down subsystem.
*/
void
-TEAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_GET_done (void);
+TEAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_PUT_done (void);
/**
* Handle a "/reserve-balance-insufficient-inconsistency" request.
@@ -45,7 +45,7 @@ TEAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_GET_done (void);
* @return MHD result code
*/
MHD_RESULT
-TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_get (struct
+TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_put (struct
TAH_RequestHandler *
rh,
struct
@@ -61,4 +61,4 @@ TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_get (struct
args[]);
-#endif // SRC_TALER_AUDITOR_HTTPD_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_GET_H
+#endif // SRC_TALER_AUDITOR_HTTPD_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_PUT_H
diff --git a/src/auditor/taler-auditor-httpd_row-inconsistency-put.c b/src/auditor/taler-auditor-httpd_row-inconsistency-put.c
index 87f7f1ee9..b8544eb90 100644
--- a/src/auditor/taler-auditor-httpd_row-inconsistency-put.c
+++ b/src/auditor/taler-auditor-httpd_row-inconsistency-put.c
@@ -11,7 +11,7 @@
#include "taler_json_lib.h"
#include "taler_mhd_lib.h"
#include "taler-auditor-httpd.h"
-#include "taler-auditor-httpd_coin-inconsistency-put.h"
+#include "taler-auditor-httpd_row-inconsistency-put.h"
/**