aboutsummaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_parsing.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-09-27 20:32:30 +0200
committerChristian Grothoff <christian@grothoff.org>2015-09-27 20:32:30 +0200
commitbf8b9d1435a196c9b7c3293904da2a3baba7210a (patch)
treeb722367def8d35bff70938db77323de61efd0348 /src/mint/taler-mint-httpd_parsing.c
parenta67fefa9fbcf9774d277a9c94aeebdf78d2051d1 (diff)
parent1bfba318ec0f3393de2dfc66821dec6165eef90a (diff)
mention need to audit randomness of gamma
Diffstat (limited to 'src/mint/taler-mint-httpd_parsing.c')
-rw-r--r--src/mint/taler-mint-httpd_parsing.c55
1 files changed, 26 insertions, 29 deletions
diff --git a/src/mint/taler-mint-httpd_parsing.c b/src/mint/taler-mint-httpd_parsing.c
index 4e7020bf..36520290 100644
--- a/src/mint/taler-mint-httpd_parsing.c
+++ b/src/mint/taler-mint-httpd_parsing.c
@@ -792,32 +792,29 @@ TMH_PARSE_navigate_json (struct MHD_Connection *connection,
where))
{
GNUNET_break_op (0);
- if (MHD_YES !=
- TMH_RESPONSE_reply_json_pack (connection,
- MHD_HTTP_BAD_REQUEST,
- "{s:s, s:O}",
- "error", "Bad format",
- "path", path))
- return GNUNET_SYSERR;
- return GNUNET_NO;
+ ret = (MHD_YES !=
+ TMH_RESPONSE_reply_json_pack (connection,
+ MHD_HTTP_BAD_REQUEST,
+ "{s:s, s:O}",
+ "error", "Bad format",
+ "path", path))
+ ? GNUNET_SYSERR : GNUNET_NO;
+ break;
}
if (0 != strcmp (where->currency,
TMH_mint_currency_string))
{
GNUNET_break_op (0);
- if (MHD_YES !=
- TMH_RESPONSE_reply_json_pack (connection,
- MHD_HTTP_BAD_REQUEST,
- "{s:s, s:O, s:s}",
- "error", "Currency not supported",
- "path", path,
- "currency", where->currency))
- {
- memset (where, 0, sizeof (struct TALER_Amount));
- return GNUNET_SYSERR;
- }
+ ret = (MHD_YES !=
+ TMH_RESPONSE_reply_json_pack (connection,
+ MHD_HTTP_BAD_REQUEST,
+ "{s:s, s:O, s:s}",
+ "error", "Currency not supported",
+ "path", path,
+ "currency", where->currency))
+ ? GNUNET_SYSERR : GNUNET_NO;
memset (where, 0, sizeof (struct TALER_Amount));
- return GNUNET_NO;
+ break;
}
ret = GNUNET_OK;
break;
@@ -832,15 +829,15 @@ TMH_PARSE_navigate_json (struct MHD_Connection *connection,
where))
{
GNUNET_break_op (0);
- if (MHD_YES !=
- TMH_RESPONSE_reply_json_pack (connection,
- MHD_HTTP_BAD_REQUEST,
- "{s:s, s:s, s:O}",
- "error", "Bad format",
- "hint", "expected absolute time",
- "path", path))
- return GNUNET_SYSERR;
- return GNUNET_NO;
+ ret = (MHD_YES !=
+ TMH_RESPONSE_reply_json_pack (connection,
+ MHD_HTTP_BAD_REQUEST,
+ "{s:s, s:s, s:O}",
+ "error", "Bad format",
+ "hint", "expected absolute time",
+ "path", path))
+ ? GNUNET_SYSERR : GNUNET_NO;
+ break;
}
ret = GNUNET_OK;
break;