diff options
Diffstat (limited to 'src/exchange/taler-exchange-httpd_refresh_link.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_refresh_link.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/exchange/taler-exchange-httpd_refresh_link.c b/src/exchange/taler-exchange-httpd_refresh_link.c index b6712f75c..e5a332308 100644 --- a/src/exchange/taler-exchange-httpd_refresh_link.c +++ b/src/exchange/taler-exchange-httpd_refresh_link.c | |||
@@ -88,10 +88,12 @@ handle_link_data (void *cls, | |||
88 | goto fail; | 88 | goto fail; |
89 | json_object_set_new (obj, | 89 | json_object_set_new (obj, |
90 | "denom_pub", | 90 | "denom_pub", |
91 | GNUNET_JSON_from_rsa_public_key (pos->denom_pub.rsa_public_key)); | 91 | GNUNET_JSON_from_rsa_public_key ( |
92 | pos->denom_pub.rsa_public_key)); | ||
92 | json_object_set_new (obj, | 93 | json_object_set_new (obj, |
93 | "ev_sig", | 94 | "ev_sig", |
94 | GNUNET_JSON_from_rsa_signature (pos->ev_sig.rsa_signature)); | 95 | GNUNET_JSON_from_rsa_signature ( |
96 | pos->ev_sig.rsa_signature)); | ||
95 | json_object_set_new (obj, | 97 | json_object_set_new (obj, |
96 | "link_sig", | 98 | "link_sig", |
97 | GNUNET_JSON_from_data_auto (&pos->orig_coin_link_sig)); | 99 | GNUNET_JSON_from_data_auto (&pos->orig_coin_link_sig)); |
@@ -113,7 +115,7 @@ handle_link_data (void *cls, | |||
113 | root)) | 115 | root)) |
114 | goto fail; | 116 | goto fail; |
115 | return; | 117 | return; |
116 | fail: | 118 | fail: |
117 | ctx->ec = TALER_EC_JSON_ALLOCATION_FAILURE; | 119 | ctx->ec = TALER_EC_JSON_ALLOCATION_FAILURE; |
118 | json_decref (ctx->mlist); | 120 | json_decref (ctx->mlist); |
119 | ctx->mlist = NULL; | 121 | ctx->mlist = NULL; |
@@ -140,9 +142,9 @@ handle_link_data (void *cls, | |||
140 | */ | 142 | */ |
141 | static enum GNUNET_DB_QueryStatus | 143 | static enum GNUNET_DB_QueryStatus |
142 | refresh_link_transaction (void *cls, | 144 | refresh_link_transaction (void *cls, |
143 | struct MHD_Connection *connection, | 145 | struct MHD_Connection *connection, |
144 | struct TALER_EXCHANGEDB_Session *session, | 146 | struct TALER_EXCHANGEDB_Session *session, |
145 | int *mhd_ret) | 147 | int *mhd_ret) |
146 | { | 148 | { |
147 | struct HTD_Context *ctx = cls; | 149 | struct HTD_Context *ctx = cls; |
148 | enum GNUNET_DB_QueryStatus qs; | 150 | enum GNUNET_DB_QueryStatus qs; |
@@ -162,8 +164,8 @@ refresh_link_transaction (void *cls, | |||
162 | if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) | 164 | if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) |
163 | { | 165 | { |
164 | *mhd_ret = TEH_RESPONSE_reply_arg_unknown (connection, | 166 | *mhd_ret = TEH_RESPONSE_reply_arg_unknown (connection, |
165 | TALER_EC_REFRESH_LINK_COIN_UNKNOWN, | 167 | TALER_EC_REFRESH_LINK_COIN_UNKNOWN, |
166 | "coin_pub"); | 168 | "coin_pub"); |
167 | return GNUNET_DB_STATUS_HARD_ERROR; | 169 | return GNUNET_DB_STATUS_HARD_ERROR; |
168 | } | 170 | } |
169 | return qs; | 171 | return qs; |
@@ -193,12 +195,13 @@ TEH_REFRESH_handler_refresh_link (struct TEH_RequestHandler *rh, | |||
193 | struct HTD_Context ctx; | 195 | struct HTD_Context ctx; |
194 | 196 | ||
195 | memset (&ctx, | 197 | memset (&ctx, |
196 | 0, | 198 | 0, |
197 | sizeof (ctx)); | 199 | sizeof (ctx)); |
198 | res = TEH_PARSE_mhd_request_arg_data (connection, | 200 | res = TEH_PARSE_mhd_request_arg_data (connection, |
199 | "coin_pub", | 201 | "coin_pub", |
200 | &ctx.coin_pub, | 202 | &ctx.coin_pub, |
201 | sizeof (struct TALER_CoinSpendPublicKeyP)); | 203 | sizeof (struct |
204 | TALER_CoinSpendPublicKeyP)); | ||
202 | if (GNUNET_SYSERR == res) | 205 | if (GNUNET_SYSERR == res) |
203 | return MHD_NO; | 206 | return MHD_NO; |
204 | if (GNUNET_OK != res) | 207 | if (GNUNET_OK != res) |