summaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_parsing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mint/taler-mint-httpd_parsing.c')
-rw-r--r--src/mint/taler-mint-httpd_parsing.c29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/mint/taler-mint-httpd_parsing.c b/src/mint/taler-mint-httpd_parsing.c
index a976c0c06..9a3fc1d6b 100644
--- a/src/mint/taler-mint-httpd_parsing.c
+++ b/src/mint/taler-mint-httpd_parsing.c
@@ -156,11 +156,11 @@ buffer_append (struct Buffer *buf,
* GNUNET_SYSERR on internal error
*/
int
-process_post_json (struct MHD_Connection *connection,
- void **con_cls,
- const char *upload_data,
- size_t *upload_data_size,
- json_t **json)
+TALER_MINT_parse_post_json (struct MHD_Connection *connection,
+ void **con_cls,
+ const char *upload_data,
+ size_t *upload_data_size,
+ json_t **json)
{
struct Buffer *r = *con_cls;
@@ -229,6 +229,23 @@ process_post_json (struct MHD_Connection *connection,
/**
+ * Function called whenever we are done with a request
+ * to clean up our state.
+ *
+ * @param con_cls value as it was left by
+ * #TALER_MINT_parse_post_json(), to be cleaned up
+ */
+void
+TALER_MINT_parse_post_cleanup_callback (void *con_cls)
+{
+ struct Buffer *r = con_cls;
+
+ if (NULL != r)
+ buffer_deinit (r);
+}
+
+
+/**
* Navigate through a JSON tree.
*
* Sends an error response if navigation is impossible (i.e.
@@ -451,3 +468,5 @@ TALER_MINT_mhd_request_arg_data (struct MHD_Connection *connection,
? GNUNET_SYSERR : GNUNET_NO;
return GNUNET_OK;
}
+
+/* end of taler-mint-httpd_parsing.c */