diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-10-31 10:19:37 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-10-31 13:01:55 +0100 |
commit | b94c69aeb88d446415e8f12b6e5454d027176b0d (patch) | |
tree | 83801b4953b91215de3881ef55bf1593de292f71 | |
parent | 6edff51bf6044779a42bac7b964a08d44b45fe0b (diff) | |
download | merchant-b94c69aeb88d446415e8f12b6e5454d027176b0d.tar.gz merchant-b94c69aeb88d446415e8f12b6e5454d027176b0d.zip |
tighten formatting rules
43 files changed, 153 insertions, 98 deletions
diff --git a/contrib/uncrustify.cfg b/contrib/uncrustify.cfg index f56c8e73..8c9df2c4 100644 --- a/contrib/uncrustify.cfg +++ b/contrib/uncrustify.cfg | |||
@@ -49,8 +49,12 @@ nl_assign_brace=remove | |||
49 | 49 | ||
50 | # No extra newlines that cause noisy diffs | 50 | # No extra newlines that cause noisy diffs |
51 | nl_start_of_file=remove | 51 | nl_start_of_file=remove |
52 | nl_after_func_proto = 2 | ||
53 | nl_after_func_body = 3 | ||
52 | # If there's no new line, it's not a text file! | 54 | # If there's no new line, it's not a text file! |
53 | nl_end_of_file=add | 55 | nl_end_of_file=add |
56 | nl_max_blank_in_func = 3 | ||
57 | nl_max = 3 | ||
54 | 58 | ||
55 | sp_inside_paren = remove | 59 | sp_inside_paren = remove |
56 | 60 | ||
@@ -69,6 +73,7 @@ sp_between_ptr_star = remove | |||
69 | sp_before_sparen = add | 73 | sp_before_sparen = add |
70 | 74 | ||
71 | sp_inside_fparen = remove | 75 | sp_inside_fparen = remove |
76 | sp_inside_sparen = remove | ||
72 | 77 | ||
73 | # add space before function call and decl: "foo (x)" | 78 | # add space before function call and decl: "foo (x)" |
74 | sp_func_call_paren = add | 79 | sp_func_call_paren = add |
@@ -76,3 +81,15 @@ sp_func_proto_paren = add | |||
76 | sp_func_proto_paren_empty = add | 81 | sp_func_proto_paren_empty = add |
77 | sp_func_def_paren = add | 82 | sp_func_def_paren = add |
78 | sp_func_def_paren_empty = add | 83 | sp_func_def_paren_empty = add |
84 | |||
85 | # We'd want it for "if ( (foo) || (bar) )", but not for "if (m())", | ||
86 | # so as uncrustify doesn't give exactly what we want => ignore | ||
87 | sp_paren_paren = ignore | ||
88 | sp_inside_paren = remove | ||
89 | sp_bool = force | ||
90 | |||
91 | nl_func_type_name = force | ||
92 | #nl_branch_else = add | ||
93 | nl_else_brace = add | ||
94 | nl_elseif_brace = add | ||
95 | nl_for_brace = add | ||
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c index 66dcc461..42e15ea1 100644 --- a/src/backend/taler-merchant-httpd.c +++ b/src/backend/taler-merchant-httpd.c | |||
@@ -168,7 +168,7 @@ is_valid_correlation_id (const char *correlation_id) | |||
168 | if (strlen (correlation_id) >= 64) | 168 | if (strlen (correlation_id) >= 64) |
169 | return GNUNET_NO; | 169 | return GNUNET_NO; |
170 | for (size_t i = 0; i < strlen (correlation_id); i++) | 170 | for (size_t i = 0; i < strlen (correlation_id); i++) |
171 | if (! (isalnum (correlation_id[i]) ||(correlation_id[i] == '-'))) | 171 | if (! (isalnum (correlation_id[i]) || (correlation_id[i] == '-'))) |
172 | return GNUNET_NO; | 172 | return GNUNET_NO; |
173 | return GNUNET_YES; | 173 | return GNUNET_YES; |
174 | } | 174 | } |
diff --git a/src/backend/taler-merchant-httpd_auditors.c b/src/backend/taler-merchant-httpd_auditors.c index 9aab2374..fc255836 100644 --- a/src/backend/taler-merchant-httpd_auditors.c +++ b/src/backend/taler-merchant-httpd_auditors.c | |||
@@ -270,4 +270,5 @@ TMH_AUDITORS_done () | |||
270 | nauditors = 0; | 270 | nauditors = 0; |
271 | } | 271 | } |
272 | 272 | ||
273 | |||
273 | /* end of taler-merchant-httpd_auditors.c */ | 274 | /* end of taler-merchant-httpd_auditors.c */ |
diff --git a/src/backend/taler-merchant-httpd_auditors.h b/src/backend/taler-merchant-httpd_auditors.h index cc980b88..e3ec292e 100644 --- a/src/backend/taler-merchant-httpd_auditors.h +++ b/src/backend/taler-merchant-httpd_auditors.h | |||
@@ -69,6 +69,4 @@ void | |||
69 | TMH_AUDITORS_done (void); | 69 | TMH_AUDITORS_done (void); |
70 | 70 | ||
71 | 71 | ||
72 | |||
73 | |||
74 | #endif | 72 | #endif |
diff --git a/src/backend/taler-merchant-httpd_check-payment.c b/src/backend/taler-merchant-httpd_check-payment.c index ee7c9289..02a5120b 100644 --- a/src/backend/taler-merchant-httpd_check-payment.c +++ b/src/backend/taler-merchant-httpd_check-payment.c | |||
@@ -37,7 +37,6 @@ | |||
37 | #define MAX_RETRIES 5 | 37 | #define MAX_RETRIES 5 |
38 | 38 | ||
39 | 39 | ||
40 | |||
41 | /** | 40 | /** |
42 | * Make a taler://pay URI | 41 | * Make a taler://pay URI |
43 | * | 42 | * |
@@ -106,7 +105,6 @@ make_taler_pay_uri (struct MHD_Connection *connection, | |||
106 | } | 105 | } |
107 | 106 | ||
108 | 107 | ||
109 | |||
110 | /** | 108 | /** |
111 | * Function called with information about a refund. | 109 | * Function called with information about a refund. |
112 | * It is responsible for summing up the refund amount. | 110 | * It is responsible for summing up the refund amount. |
@@ -427,7 +425,6 @@ MH_handler_check_payment (struct TMH_RequestHandler *rh, | |||
427 | GNUNET_HashCode)); | 425 | GNUNET_HashCode)); |
428 | 426 | ||
429 | 427 | ||
430 | |||
431 | /* Check if the order has been paid for. */ | 428 | /* Check if the order has been paid for. */ |
432 | if (NULL != session_id) | 429 | if (NULL != session_id) |
433 | { | 430 | { |
diff --git a/src/backend/taler-merchant-httpd_config.c b/src/backend/taler-merchant-httpd_config.c index 21fb55cc..8af84e91 100644 --- a/src/backend/taler-merchant-httpd_config.c +++ b/src/backend/taler-merchant-httpd_config.c | |||
@@ -56,4 +56,5 @@ MH_handler_config (struct TMH_RequestHandler *rh, | |||
56 | "currency", TMH_currency); | 56 | "currency", TMH_currency); |
57 | } | 57 | } |
58 | 58 | ||
59 | |||
59 | /* end of taler-merchant-httpd_config.c */ | 60 | /* end of taler-merchant-httpd_config.c */ |
diff --git a/src/backend/taler-merchant-httpd_exchanges.c b/src/backend/taler-merchant-httpd_exchanges.c index a589fbaa..1dfd8100 100644 --- a/src/backend/taler-merchant-httpd_exchanges.c +++ b/src/backend/taler-merchant-httpd_exchanges.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include "taler-merchant-httpd_exchanges.h" | 25 | #include "taler-merchant-httpd_exchanges.h" |
26 | 26 | ||
27 | 27 | ||
28 | |||
29 | /** | 28 | /** |
30 | * Delay after which we'll re-fetch key information from the exchange. | 29 | * Delay after which we'll re-fetch key information from the exchange. |
31 | */ | 30 | */ |
@@ -1153,4 +1152,5 @@ TMH_EXCHANGES_done () | |||
1153 | trusted_exchanges = NULL; | 1152 | trusted_exchanges = NULL; |
1154 | } | 1153 | } |
1155 | 1154 | ||
1155 | |||
1156 | /* end of taler-merchant-httpd_exchanges.c */ | 1156 | /* end of taler-merchant-httpd_exchanges.c */ |
diff --git a/src/backend/taler-merchant-httpd_history.c b/src/backend/taler-merchant-httpd_history.c index 5db0fb61..e4ba5092 100644 --- a/src/backend/taler-merchant-httpd_history.c +++ b/src/backend/taler-merchant-httpd_history.c | |||
@@ -290,4 +290,5 @@ MH_handler_history (struct TMH_RequestHandler *rh, | |||
290 | return ret; | 290 | return ret; |
291 | } | 291 | } |
292 | 292 | ||
293 | |||
293 | /* end of taler-merchant-httpd_history.c */ | 294 | /* end of taler-merchant-httpd_history.c */ |
diff --git a/src/backend/taler-merchant-httpd_parsing.c b/src/backend/taler-merchant-httpd_parsing.c index 7e21482a..497db87a 100644 --- a/src/backend/taler-merchant-httpd_parsing.c +++ b/src/backend/taler-merchant-httpd_parsing.c | |||
@@ -67,8 +67,6 @@ struct Buffer | |||
67 | }; | 67 | }; |
68 | 68 | ||
69 | 69 | ||
70 | |||
71 | |||
72 | /** | 70 | /** |
73 | * Free the data in a buffer. Does *not* free | 71 | * Free the data in a buffer. Does *not* free |
74 | * the buffer object itself. | 72 | * the buffer object itself. |
@@ -83,7 +81,6 @@ buffer_deinit (struct Buffer *buf) | |||
83 | } | 81 | } |
84 | 82 | ||
85 | 83 | ||
86 | |||
87 | /** | 84 | /** |
88 | * Function called whenever we are done with a request | 85 | * Function called whenever we are done with a request |
89 | * to clean up our state. | 86 | * to clean up our state. |
@@ -220,7 +217,6 @@ TMH_PARSE_json_data (struct MHD_Connection *connection, | |||
220 | } | 217 | } |
221 | 218 | ||
222 | 219 | ||
223 | |||
224 | /** | 220 | /** |
225 | * Extract base32crockford encoded data from request. | 221 | * Extract base32crockford encoded data from request. |
226 | * | 222 | * |
diff --git a/src/backend/taler-merchant-httpd_pay.c b/src/backend/taler-merchant-httpd_pay.c index 7b2e3fb9..69b8e2d4 100644 --- a/src/backend/taler-merchant-httpd_pay.c +++ b/src/backend/taler-merchant-httpd_pay.c | |||
@@ -738,8 +738,7 @@ check_payment_sufficient (struct PayContext *pc) | |||
738 | * Deposit fees of *all* the coins are higher than | 738 | * Deposit fees of *all* the coins are higher than |
739 | * the fixed limit that the merchant is willing to | 739 | * the fixed limit that the merchant is willing to |
740 | * pay. The fees difference must be paid by the customer. | 740 | * pay. The fees difference must be paid by the customer. |
741 | */ | 741 | */if (-1 == TALER_amount_cmp (&pc->max_fee, |
742 | if (-1 == TALER_amount_cmp (&pc->max_fee, | ||
743 | &acc_fee)) | 742 | &acc_fee)) |
744 | { | 743 | { |
745 | struct TALER_Amount excess_fee; | 744 | struct TALER_Amount excess_fee; |
@@ -783,8 +782,7 @@ check_payment_sufficient (struct PayContext *pc) | |||
783 | * fraction, and check that the remaining paid amount is | 782 | * fraction, and check that the remaining paid amount is |
784 | * enough to pay both the remaining wire fee customer's | 783 | * enough to pay both the remaining wire fee customer's |
785 | * fraction AND the price of the contract itself. | 784 | * fraction AND the price of the contract itself. |
786 | */ | 785 | */else |
787 | else | ||
788 | { | 786 | { |
789 | struct TALER_Amount deposit_fee_savings; | 787 | struct TALER_Amount deposit_fee_savings; |
790 | 788 | ||
@@ -2230,4 +2228,5 @@ MH_handler_pay (struct TMH_RequestHandler *rh, | |||
2230 | return MHD_YES; | 2228 | return MHD_YES; |
2231 | } | 2229 | } |
2232 | 2230 | ||
2231 | |||
2233 | /* end of taler-merchant-httpd_pay.c */ | 2232 | /* end of taler-merchant-httpd_pay.c */ |
diff --git a/src/backend/taler-merchant-httpd_proposal.h b/src/backend/taler-merchant-httpd_proposal.h index 4edac090..b1185235 100644 --- a/src/backend/taler-merchant-httpd_proposal.h +++ b/src/backend/taler-merchant-httpd_proposal.h | |||
@@ -65,4 +65,5 @@ MH_handler_proposal_lookup (struct TMH_RequestHandler *rh, | |||
65 | const char *upload_data, | 65 | const char *upload_data, |
66 | size_t *upload_data_size, | 66 | size_t *upload_data_size, |
67 | struct MerchantInstance *mi); | 67 | struct MerchantInstance *mi); |
68 | |||
68 | #endif | 69 | #endif |
diff --git a/src/backend/taler-merchant-httpd_refund.c b/src/backend/taler-merchant-httpd_refund.c index a9d8ab18..a7b1660d 100644 --- a/src/backend/taler-merchant-httpd_refund.c +++ b/src/backend/taler-merchant-httpd_refund.c | |||
@@ -349,8 +349,7 @@ MH_handler_refund_increase (struct TMH_RequestHandler *rh, | |||
349 | * | 349 | * |
350 | * Just a "200 OK" should be fine here, as the frontend has all | 350 | * Just a "200 OK" should be fine here, as the frontend has all |
351 | * the information needed to generate the right response. | 351 | * the information needed to generate the right response. |
352 | */ | 352 | */confirmation.purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_REFUND_OK); |
353 | confirmation.purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_REFUND_OK); | ||
354 | confirmation.purpose.size = htonl (sizeof (struct | 353 | confirmation.purpose.size = htonl (sizeof (struct |
355 | TALER_MerchantRefundConfirmationPS)); | 354 | TALER_MerchantRefundConfirmationPS)); |
356 | GNUNET_CRYPTO_hash (order_id, | 355 | GNUNET_CRYPTO_hash (order_id, |
diff --git a/src/backend/taler-merchant-httpd_tip-authorize.c b/src/backend/taler-merchant-httpd_tip-authorize.c index 67c4a6e6..7580f445 100644 --- a/src/backend/taler-merchant-httpd_tip-authorize.c +++ b/src/backend/taler-merchant-httpd_tip-authorize.c | |||
@@ -301,4 +301,5 @@ MH_handler_tip_authorize (struct TMH_RequestHandler *rh, | |||
301 | } | 301 | } |
302 | } | 302 | } |
303 | 303 | ||
304 | |||
304 | /* end of taler-merchant-httpd_tip-authorize.c */ | 305 | /* end of taler-merchant-httpd_tip-authorize.c */ |
diff --git a/src/backend/taler-merchant-httpd_tip-query.c b/src/backend/taler-merchant-httpd_tip-query.c index d54625c0..d4a86a7a 100644 --- a/src/backend/taler-merchant-httpd_tip-query.c +++ b/src/backend/taler-merchant-httpd_tip-query.c | |||
@@ -235,4 +235,5 @@ MH_handler_tip_query (struct TMH_RequestHandler *rh, | |||
235 | return MHD_YES; | 235 | return MHD_YES; |
236 | } | 236 | } |
237 | 237 | ||
238 | |||
238 | /* end of taler-merchant-httpd_tip-query.c */ | 239 | /* end of taler-merchant-httpd_tip-query.c */ |
diff --git a/src/backend/taler-merchant-httpd_track-transfer.c b/src/backend/taler-merchant-httpd_track-transfer.c index e9e0cb97..b73bde92 100644 --- a/src/backend/taler-merchant-httpd_track-transfer.c +++ b/src/backend/taler-merchant-httpd_track-transfer.c | |||
@@ -197,6 +197,7 @@ free_transfer_track_context (struct TrackTransferContext *rctx) | |||
197 | GNUNET_free (rctx); | 197 | GNUNET_free (rctx); |
198 | } | 198 | } |
199 | 199 | ||
200 | |||
200 | /** | 201 | /** |
201 | * Callback that frees all the elements in the hashmap | 202 | * Callback that frees all the elements in the hashmap |
202 | * | 203 | * |
@@ -688,8 +689,7 @@ wire_transfer_cb (void *cls, | |||
688 | * | 689 | * |
689 | * details_length is how many (Taler coin) deposits have been | 690 | * details_length is how many (Taler coin) deposits have been |
690 | * aggregated into _this_ wire transfer. | 691 | * aggregated into _this_ wire transfer. |
691 | */ | 692 | */for (unsigned int i = 0; i<details_length; i++) |
692 | for (unsigned int i = 0; i<details_length; i++) | ||
693 | { | 693 | { |
694 | rctx->current_offset = i; | 694 | rctx->current_offset = i; |
695 | rctx->current_detail = &details[i]; | 695 | rctx->current_detail = &details[i]; |
@@ -1079,4 +1079,5 @@ MH_handler_track_transfer (struct TMH_RequestHandler *rh, | |||
1079 | return MHD_YES; | 1079 | return MHD_YES; |
1080 | } | 1080 | } |
1081 | 1081 | ||
1082 | |||
1082 | /* end of taler-merchant-httpd_track-transfer.c */ | 1083 | /* end of taler-merchant-httpd_track-transfer.c */ |
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c index 4b752893..89f8d127 100644 --- a/src/backenddb/plugin_merchantdb_postgres.c +++ b/src/backenddb/plugin_merchantdb_postgres.c | |||
@@ -588,6 +588,7 @@ postgres_insert_session_info (void *cls, | |||
588 | params); | 588 | params); |
589 | } | 589 | } |
590 | 590 | ||
591 | |||
591 | /** | 592 | /** |
592 | * Retrieve the order ID that was used to pay for a resource within a session. | 593 | * Retrieve the order ID that was used to pay for a resource within a session. |
593 | * | 594 | * |
@@ -2316,8 +2317,7 @@ process_deposits_for_refund_cb (void *cls, | |||
2316 | * Although this should be checked as the business should never | 2317 | * Although this should be checked as the business should never |
2317 | * issue a refund bigger than the contract's actual price, we cannot | 2318 | * issue a refund bigger than the contract's actual price, we cannot |
2318 | * rely upon the frontend being correct. | 2319 | * rely upon the frontend being correct. |
2319 | */ | 2320 | */GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
2320 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
2321 | "The refund of %s is bigger than the order's value\n", | 2321 | "The refund of %s is bigger than the order's value\n", |
2322 | TALER_amount2s (ctx->refund)); | 2322 | TALER_amount2s (ctx->refund)); |
2323 | 2323 | ||
@@ -2475,7 +2475,7 @@ postgres_enable_tip_reserve_TR (void *cls, | |||
2475 | 2475 | ||
2476 | retries = 0; | 2476 | retries = 0; |
2477 | check_connection (pg); | 2477 | check_connection (pg); |
2478 | RETRY: | 2478 | RETRY: |
2479 | if (MAX_RETRIES < ++retries) | 2479 | if (MAX_RETRIES < ++retries) |
2480 | return GNUNET_DB_STATUS_SOFT_ERROR; | 2480 | return GNUNET_DB_STATUS_SOFT_ERROR; |
2481 | if (GNUNET_OK != | 2481 | if (GNUNET_OK != |
@@ -2682,7 +2682,7 @@ postgres_authorize_tip_TR (void *cls, | |||
2682 | 2682 | ||
2683 | retries = 0; | 2683 | retries = 0; |
2684 | check_connection (pg); | 2684 | check_connection (pg); |
2685 | RETRY: | 2685 | RETRY: |
2686 | if (MAX_RETRIES < ++retries) | 2686 | if (MAX_RETRIES < ++retries) |
2687 | return TALER_EC_TIP_AUTHORIZE_DB_SOFT_ERROR; | 2687 | return TALER_EC_TIP_AUTHORIZE_DB_SOFT_ERROR; |
2688 | if (GNUNET_OK != | 2688 | if (GNUNET_OK != |
@@ -2898,7 +2898,7 @@ postgres_pickup_tip_TR (void *cls, | |||
2898 | 2898 | ||
2899 | retries = 0; | 2899 | retries = 0; |
2900 | check_connection (pg); | 2900 | check_connection (pg); |
2901 | RETRY: | 2901 | RETRY: |
2902 | if (MAX_RETRIES < ++retries) | 2902 | if (MAX_RETRIES < ++retries) |
2903 | return TALER_EC_TIP_PICKUP_DB_ERROR_SOFT; | 2903 | return TALER_EC_TIP_PICKUP_DB_ERROR_SOFT; |
2904 | if (GNUNET_OK != | 2904 | if (GNUNET_OK != |
@@ -3745,4 +3745,5 @@ libtaler_plugin_merchantdb_postgres_done (void *cls) | |||
3745 | return NULL; | 3745 | return NULL; |
3746 | } | 3746 | } |
3747 | 3747 | ||
3748 | |||
3748 | /* end of plugin_merchantdb_postgres.c */ | 3749 | /* end of plugin_merchantdb_postgres.c */ |
diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c index 1a569b1f..99f64344 100644 --- a/src/backenddb/test_merchantdb.c +++ b/src/backenddb/test_merchantdb.c | |||
@@ -262,8 +262,8 @@ deposit_cb (void *cls, | |||
262 | const struct TALER_Amount *awire_fee, | 262 | const struct TALER_Amount *awire_fee, |
263 | const json_t *aexchange_proof) | 263 | const json_t *aexchange_proof) |
264 | { | 264 | { |
265 | CHECK ((0 == GNUNET_memcmp (ah_contract_terms, | 265 | CHECK (0 == GNUNET_memcmp (ah_contract_terms, |
266 | &h_contract_terms))); | 266 | &h_contract_terms)); |
267 | CHECK (0 == GNUNET_memcmp (acoin_pub, | 267 | CHECK (0 == GNUNET_memcmp (acoin_pub, |
268 | &coin_pub)); | 268 | &coin_pub)); |
269 | CHECK (0 == strcmp (aexchange_url, | 269 | CHECK (0 == strcmp (aexchange_url, |
@@ -329,6 +329,8 @@ proof_cb (void *cls, | |||
329 | CHECK (1 == json_equal ((json_t *) proof, | 329 | CHECK (1 == json_equal ((json_t *) proof, |
330 | transfer_proof)); | 330 | transfer_proof)); |
331 | } | 331 | } |
332 | |||
333 | |||
332 | #undef CHECK | 334 | #undef CHECK |
333 | 335 | ||
334 | 336 | ||
@@ -1070,4 +1072,5 @@ main (int argc, | |||
1070 | return result; | 1072 | return result; |
1071 | } | 1073 | } |
1072 | 1074 | ||
1075 | |||
1073 | /* end of test_merchantdb.c */ | 1076 | /* end of test_merchantdb.c */ |
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h index cefafccf..fff74ead 100644 --- a/src/include/taler_merchant_service.h +++ b/src/include/taler_merchant_service.h | |||
@@ -247,7 +247,6 @@ TALER_MERCHANT_proposal_lookup_cancel (struct | |||
247 | plo); | 247 | plo); |
248 | 248 | ||
249 | 249 | ||
250 | |||
251 | /* ********************* /pay *********************** */ | 250 | /* ********************* /pay *********************** */ |
252 | 251 | ||
253 | 252 | ||
@@ -871,7 +870,6 @@ TALER_MERCHANT_tip_authorize (struct GNUNET_CURL_Context *ctx, | |||
871 | void *authorize_cb_cls); | 870 | void *authorize_cb_cls); |
872 | 871 | ||
873 | 872 | ||
874 | |||
875 | /** | 873 | /** |
876 | * Cancel a pending /tip-authorize request | 874 | * Cancel a pending /tip-authorize request |
877 | * | 875 | * |
diff --git a/src/include/taler_merchant_testing_lib.h b/src/include/taler_merchant_testing_lib.h index 93b92fad..ac9ae6f3 100644 --- a/src/include/taler_merchant_testing_lib.h +++ b/src/include/taler_merchant_testing_lib.h | |||
@@ -81,6 +81,7 @@ TALER_TESTING_cmd_proposal (const char *label, | |||
81 | const char *merchant_url, | 81 | const char *merchant_url, |
82 | unsigned int http_status, | 82 | unsigned int http_status, |
83 | const char *order); | 83 | const char *order); |
84 | |||
84 | /** | 85 | /** |
85 | * Make a "proposal lookup" command. | 86 | * Make a "proposal lookup" command. |
86 | * | 87 | * |
@@ -119,6 +120,7 @@ TALER_TESTING_cmd_check_payment (const char *label, | |||
119 | unsigned int http_status, | 120 | unsigned int http_status, |
120 | const char *proposal_reference, | 121 | const char *proposal_reference, |
121 | unsigned int expect_paid); | 122 | unsigned int expect_paid); |
123 | |||
122 | /** | 124 | /** |
123 | * Make a "pay" test command. | 125 | * Make a "pay" test command. |
124 | * | 126 | * |
@@ -145,6 +147,7 @@ TALER_TESTING_cmd_pay (const char *label, | |||
145 | const char *amount_with_fee, | 147 | const char *amount_with_fee, |
146 | const char *amount_without_fee, | 148 | const char *amount_without_fee, |
147 | const char *refund_fee); | 149 | const char *refund_fee); |
150 | |||
148 | /** | 151 | /** |
149 | * Make a "pay again" test command. Its purpose is to | 152 | * Make a "pay again" test command. Its purpose is to |
150 | * take all the data from a aborted "pay" CMD, and use | 153 | * take all the data from a aborted "pay" CMD, and use |
@@ -166,6 +169,7 @@ TALER_TESTING_cmd_pay_again (const char *label, | |||
166 | const char *coin_reference, | 169 | const char *coin_reference, |
167 | const char *refund_fee, | 170 | const char *refund_fee, |
168 | unsigned int http_status); | 171 | unsigned int http_status); |
172 | |||
169 | /** | 173 | /** |
170 | * Make a "pay abort" test command. | 174 | * Make a "pay abort" test command. |
171 | * | 175 | * |
@@ -651,6 +655,7 @@ struct TALER_TESTING_Command | |||
651 | TALER_TESTING_cmd_tip_query (const char *label, | 655 | TALER_TESTING_cmd_tip_query (const char *label, |
652 | const char *merchant_url, | 656 | const char *merchant_url, |
653 | unsigned int http_status); | 657 | unsigned int http_status); |
658 | |||
654 | /** | 659 | /** |
655 | * Define a /tip-query CMD equipped with a expected amount. | 660 | * Define a /tip-query CMD equipped with a expected amount. |
656 | * | 661 | * |
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h index e8a91b51..f88f3119 100644 --- a/src/include/taler_merchantdb_plugin.h +++ b/src/include/taler_merchantdb_plugin.h | |||
@@ -524,7 +524,6 @@ struct TALER_MERCHANTDB_Plugin | |||
524 | TALER_MasterSignatureP *exchange_sig); | 524 | TALER_MasterSignatureP *exchange_sig); |
525 | 525 | ||
526 | 526 | ||
527 | |||
528 | /** | 527 | /** |
529 | * Lookup information about coin payments by proposal data's hashcode. | 528 | * Lookup information about coin payments by proposal data's hashcode. |
530 | * | 529 | * |
diff --git a/src/lib/merchant_api_check_payment.c b/src/lib/merchant_api_check_payment.c index ba5ac770..8a85d26a 100644 --- a/src/lib/merchant_api_check_payment.c +++ b/src/lib/merchant_api_check_payment.c | |||
@@ -126,7 +126,8 @@ handle_check_payment_finished (void *cls, | |||
126 | &refund_amount, | 126 | &refund_amount, |
127 | NULL); | 127 | NULL); |
128 | } | 128 | } |
129 | else { | 129 | else |
130 | { | ||
130 | cpo->cb (cpo->cb_cls, | 131 | cpo->cb (cpo->cb_cls, |
131 | response_code, | 132 | response_code, |
132 | json, | 133 | json, |
@@ -249,4 +250,5 @@ TALER_MERCHANT_check_payment_cancel (struct | |||
249 | GNUNET_free (cph); | 250 | GNUNET_free (cph); |
250 | } | 251 | } |
251 | 252 | ||
253 | |||
252 | /* end of merchant_api_check_payment.c */ | 254 | /* end of merchant_api_check_payment.c */ |
diff --git a/src/lib/merchant_api_history.c b/src/lib/merchant_api_history.c index 4c23c010..726204c3 100644 --- a/src/lib/merchant_api_history.c +++ b/src/lib/merchant_api_history.c | |||
@@ -148,6 +148,7 @@ history_raw_cb (void *cls, | |||
148 | TALER_MERCHANT_history_cancel (ho); | 148 | TALER_MERCHANT_history_cancel (ho); |
149 | } | 149 | } |
150 | 150 | ||
151 | |||
151 | /** | 152 | /** |
152 | * Issue a /history request to the backend. | 153 | * Issue a /history request to the backend. |
153 | * | 154 | * |
@@ -199,7 +200,6 @@ TALER_MERCHANT_history2 (struct GNUNET_CURL_Context *ctx, | |||
199 | start); | 200 | start); |
200 | 201 | ||
201 | 202 | ||
202 | |||
203 | GNUNET_free (base); | 203 | GNUNET_free (base); |
204 | eh = curl_easy_init (); | 204 | eh = curl_easy_init (); |
205 | if (CURLE_OK != curl_easy_setopt (eh, | 205 | if (CURLE_OK != curl_easy_setopt (eh, |
diff --git a/src/lib/merchant_api_proposal.c b/src/lib/merchant_api_proposal.c index 88e68dac..de2a2281 100644 --- a/src/lib/merchant_api_proposal.c +++ b/src/lib/merchant_api_proposal.c | |||
@@ -458,4 +458,5 @@ TALER_MERCHANT_proposal_lookup_cancel | |||
458 | GNUNET_free (plo); | 458 | GNUNET_free (plo); |
459 | } | 459 | } |
460 | 460 | ||
461 | |||
461 | /* end of merchant_api_contract.c */ | 462 | /* end of merchant_api_contract.c */ |
diff --git a/src/lib/merchant_api_refund.c b/src/lib/merchant_api_refund.c index 5a6b0e39..19b39e6b 100644 --- a/src/lib/merchant_api_refund.c +++ b/src/lib/merchant_api_refund.c | |||
@@ -138,8 +138,7 @@ handle_refund_increase_finished (void *cls, | |||
138 | * The backend gave response, but it's error, log it. | 138 | * The backend gave response, but it's error, log it. |
139 | * NOTE that json must be a Taler-specific error object (FIXME, | 139 | * NOTE that json must be a Taler-specific error object (FIXME, |
140 | * need a link to error objects at docs) | 140 | * need a link to error objects at docs) |
141 | */ | 141 | */if (-1 == json_unpack |
142 | if (-1 == json_unpack | ||
143 | ((json_t *) json, | 142 | ((json_t *) json, |
144 | "{s:s, s:I, s:s}", | 143 | "{s:s, s:I, s:s}", |
145 | "error", &error, | 144 | "error", &error, |
@@ -297,8 +296,7 @@ handle_refund_lookup_finished (void *cls, | |||
297 | * The backend gave response, but it's error, log it. | 296 | * The backend gave response, but it's error, log it. |
298 | * NOTE that json must be a Taler-specific error object (FIXME, | 297 | * NOTE that json must be a Taler-specific error object (FIXME, |
299 | * need a link to error objects at docs) | 298 | * need a link to error objects at docs) |
300 | */ | 299 | */if (-1 == json_unpack ((json_t *) json, |
301 | if (-1 == json_unpack ((json_t *) json, | ||
302 | "{s:s, s:I, s:s}", | 300 | "{s:s, s:I, s:s}", |
303 | "error", &error, | 301 | "error", &error, |
304 | "code", &code)) | 302 | "code", &code)) |
diff --git a/src/lib/merchant_api_tip_authorize.c b/src/lib/merchant_api_tip_authorize.c index 582c9a4e..22fd3291 100644 --- a/src/lib/merchant_api_tip_authorize.c +++ b/src/lib/merchant_api_tip_authorize.c | |||
@@ -268,4 +268,5 @@ TALER_MERCHANT_tip_authorize_cancel (struct | |||
268 | GNUNET_free (tao); | 268 | GNUNET_free (tao); |
269 | } | 269 | } |
270 | 270 | ||
271 | |||
271 | /* end of merchant_api_tip_authorize.c */ | 272 | /* end of merchant_api_tip_authorize.c */ |
diff --git a/src/lib/merchant_api_tip_pickup.c b/src/lib/merchant_api_tip_pickup.c index 34b7d259..12b08f4f 100644 --- a/src/lib/merchant_api_tip_pickup.c +++ b/src/lib/merchant_api_tip_pickup.c | |||
@@ -337,4 +337,5 @@ TALER_MERCHANT_tip_pickup_cancel (struct TALER_MERCHANT_TipPickupOperation *tpo) | |||
337 | GNUNET_free (tpo); | 337 | GNUNET_free (tpo); |
338 | } | 338 | } |
339 | 339 | ||
340 | |||
340 | /* end of merchant_api_tip_pickup.c */ | 341 | /* end of merchant_api_tip_pickup.c */ |
diff --git a/src/lib/merchant_api_tip_query.c b/src/lib/merchant_api_tip_query.c index 0f72482c..8e3600d5 100644 --- a/src/lib/merchant_api_tip_query.c +++ b/src/lib/merchant_api_tip_query.c | |||
@@ -242,4 +242,5 @@ TALER_MERCHANT_tip_query_cancel (struct TALER_MERCHANT_TipQueryOperation *tqo) | |||
242 | GNUNET_free (tqo); | 242 | GNUNET_free (tqo); |
243 | } | 243 | } |
244 | 244 | ||
245 | |||
245 | /* end of merchant_api_tip_query.c */ | 246 | /* end of merchant_api_tip_query.c */ |
diff --git a/src/lib/merchant_api_track_transaction.c b/src/lib/merchant_api_track_transaction.c index e2889b38..aa72962c 100644 --- a/src/lib/merchant_api_track_transaction.c +++ b/src/lib/merchant_api_track_transaction.c | |||
@@ -193,4 +193,5 @@ TALER_MERCHANT_track_transaction_cancel (struct | |||
193 | GNUNET_free (tdo); | 193 | GNUNET_free (tdo); |
194 | } | 194 | } |
195 | 195 | ||
196 | |||
196 | /* end of merchant_api_track_transaction.c */ | 197 | /* end of merchant_api_track_transaction.c */ |
diff --git a/src/lib/merchant_api_track_transfer.c b/src/lib/merchant_api_track_transfer.c index df303b1b..791d5b8c 100644 --- a/src/lib/merchant_api_track_transfer.c +++ b/src/lib/merchant_api_track_transfer.c | |||
@@ -287,4 +287,5 @@ TALER_MERCHANT_track_transfer_cancel (struct | |||
287 | GNUNET_free (tdo); | 287 | GNUNET_free (tdo); |
288 | } | 288 | } |
289 | 289 | ||
290 | |||
290 | /* end of merchant_api_track_transfer.c */ | 291 | /* end of merchant_api_track_transfer.c */ |
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c index bb7d9e26..5499a83f 100644 --- a/src/lib/test_merchant_api.c +++ b/src/lib/test_merchant_api.c | |||
@@ -366,14 +366,12 @@ run (void *cls, | |||
366 | * all records to be returned; setting date as 0 lets the | 366 | * all records to be returned; setting date as 0 lets the |
367 | * interpreter set it as 'now' + one hour delta, just to | 367 | * interpreter set it as 'now' + one hour delta, just to |
368 | * make sure it surpasses the proposal's timestamp. | 368 | * make sure it surpasses the proposal's timestamp. |
369 | */ | 369 | */GNUNET_TIME_UNIT_ZERO_ABS, |
370 | GNUNET_TIME_UNIT_ZERO_ABS, | ||
371 | /** | 370 | /** |
372 | * We only expect ONE result (create-proposal-1) to be | 371 | * We only expect ONE result (create-proposal-1) to be |
373 | * included in /history response, because create-proposal-3 | 372 | * included in /history response, because create-proposal-3 |
374 | * did NOT go through because of double spending. | 373 | * did NOT go through because of double spending. |
375 | */ | 374 | */1, // nresult |
376 | 1, // nresult | ||
377 | 10, // start | 375 | 10, // start |
378 | -10), // nrows | 376 | -10), // nrows |
379 | 377 | ||
@@ -487,8 +485,7 @@ run (void *cls, | |||
487 | * Now we expect BOTH contracts (create-proposal-{1,2}) | 485 | * Now we expect BOTH contracts (create-proposal-{1,2}) |
488 | * to be included in /history response, because | 486 | * to be included in /history response, because |
489 | * create-proposal-2 has now been correctly paid. | 487 | * create-proposal-2 has now been correctly paid. |
490 | */ | 488 | */2, |
491 | 2, | ||
492 | 10, | 489 | 10, |
493 | -10), | 490 | -10), |
494 | TALER_TESTING_cmd_end () | 491 | TALER_TESTING_cmd_end () |
@@ -567,8 +564,7 @@ run (void *cls, | |||
567 | * it, and finally (4) attempt to pick up a refund | 564 | * it, and finally (4) attempt to pick up a refund |
568 | * from it without any increasing taking place | 565 | * from it without any increasing taking place |
569 | * in the first place. | 566 | * in the first place. |
570 | **/ | 567 | **/CMD_TRANSFER_TO_EXCHANGE ("create-reserve-unincreased-refund", |
571 | CMD_TRANSFER_TO_EXCHANGE ("create-reserve-unincreased-refund", | ||
572 | "EUR:5.01"), | 568 | "EUR:5.01"), |
573 | 569 | ||
574 | CMD_EXEC_WIREWATCH ("wirewatch-unincreased-refund"), | 570 | CMD_EXEC_WIREWATCH ("wirewatch-unincreased-refund"), |
@@ -682,8 +678,7 @@ run (void *cls, | |||
682 | * against a reserve that does not exist. This is | 678 | * against a reserve that does not exist. This is |
683 | * implemented by passing a "tip instance" that | 679 | * implemented by passing a "tip instance" that |
684 | * specifies a reserve key that was never used to | 680 | * specifies a reserve key that was never used to |
685 | * actually create a reserve. */ | 681 | * actually create a reserve. */TALER_TESTING_cmd_tip_authorize_with_ec |
686 | TALER_TESTING_cmd_tip_authorize_with_ec | ||
687 | ("authorize-tip-null", | 682 | ("authorize-tip-null", |
688 | merchant_url_internal ("nulltip"), | 683 | merchant_url_internal ("nulltip"), |
689 | exchange_url, | 684 | exchange_url, |
@@ -1061,6 +1056,7 @@ run (void *cls, | |||
1061 | fakebank_url); | 1056 | fakebank_url); |
1062 | } | 1057 | } |
1063 | 1058 | ||
1059 | |||
1064 | int | 1060 | int |
1065 | main (int argc, | 1061 | main (int argc, |
1066 | char *const *argv) | 1062 | char *const *argv) |
@@ -1119,4 +1115,5 @@ main (int argc, | |||
1119 | return 0; | 1115 | return 0; |
1120 | } | 1116 | } |
1121 | 1117 | ||
1118 | |||
1122 | /* end of test_merchant_api_new.c */ | 1119 | /* end of test_merchant_api_new.c */ |
diff --git a/src/lib/test_merchant_api_twisted.c b/src/lib/test_merchant_api_twisted.c index f34795df..09485ef7 100644 --- a/src/lib/test_merchant_api_twisted.c +++ b/src/lib/test_merchant_api_twisted.c | |||
@@ -258,8 +258,7 @@ run (void *cls, | |||
258 | * not manage to pass the callback a valid JSON and will | 258 | * not manage to pass the callback a valid JSON and will |
259 | * instead pass a NULL pointer. This should trigger the path | 259 | * instead pass a NULL pointer. This should trigger the path |
260 | * mentioned in the bug report #5719. | 260 | * mentioned in the bug report #5719. |
261 | */ | 261 | */TALER_TESTING_cmd_malform_response |
262 | TALER_TESTING_cmd_malform_response | ||
263 | ("5719-malform-exchange-resp", | 262 | ("5719-malform-exchange-resp", |
264 | PROXY_EXCHANGE_CONFIG_FILE), | 263 | PROXY_EXCHANGE_CONFIG_FILE), |
265 | 264 | ||
@@ -375,9 +374,7 @@ run (void *cls, | |||
375 | * Cause the PUT /proposal callback to be called | 374 | * Cause the PUT /proposal callback to be called |
376 | * with a response code == 0. We achieve this by malforming | 375 | * with a response code == 0. We achieve this by malforming |
377 | * the response body. | 376 | * the response body. |
378 | */ | 377 | */TALER_TESTING_cmd_malform_response |
379 | |||
380 | TALER_TESTING_cmd_malform_response | ||
381 | ("malform-proposal", | 378 | ("malform-proposal", |
382 | PROXY_MERCHANT_CONFIG_FILE), | 379 | PROXY_MERCHANT_CONFIG_FILE), |
383 | 380 | ||
@@ -507,8 +504,7 @@ run (void *cls, | |||
507 | * code, that is then expected to trigger some | 504 | * code, that is then expected to trigger some |
508 | * emergency behaviour, like setting the response | 505 | * emergency behaviour, like setting the response |
509 | * code to zero before calling the callback. | 506 | * code to zero before calling the callback. |
510 | */ | 507 | */TALER_TESTING_cmd_hack_response_code |
511 | TALER_TESTING_cmd_hack_response_code | ||
512 | ("twist-history", | 508 | ("twist-history", |
513 | PROXY_MERCHANT_CONFIG_FILE, | 509 | PROXY_MERCHANT_CONFIG_FILE, |
514 | MHD_HTTP_GONE), | 510 | MHD_HTTP_GONE), |
@@ -524,8 +520,7 @@ run (void *cls, | |||
524 | * Making the returned response malformed, in order | 520 | * Making the returned response malformed, in order |
525 | * to make the JSON downloader+parser fail and call | 521 | * to make the JSON downloader+parser fail and call |
526 | * the lib passing a response code as zero. | 522 | * the lib passing a response code as zero. |
527 | */ | 523 | */TALER_TESTING_cmd_malform_response |
528 | TALER_TESTING_cmd_malform_response | ||
529 | ("malform-history", | 524 | ("malform-history", |
530 | PROXY_MERCHANT_CONFIG_FILE), | 525 | PROXY_MERCHANT_CONFIG_FILE), |
531 | 526 | ||
@@ -545,8 +540,7 @@ run (void *cls, | |||
545 | * This block tests whether a refund_deadline and/or | 540 | * This block tests whether a refund_deadline and/or |
546 | * wire_transfer_deadline very far in the future do NOT | 541 | * wire_transfer_deadline very far in the future do NOT |
547 | * result in any wire transfer from the aggregator (#5366). | 542 | * result in any wire transfer from the aggregator (#5366). |
548 | */ | 543 | */struct TALER_TESTING_Command unaggregation[] = { |
549 | struct TALER_TESTING_Command unaggregation[] = { | ||
550 | 544 | ||
551 | CMD_TRANSFER_TO_EXCHANGE | 545 | CMD_TRANSFER_TO_EXCHANGE |
552 | ("create-reserve-unaggregation", | 546 | ("create-reserve-unaggregation", |
@@ -672,8 +666,7 @@ run (void *cls, | |||
672 | brutto 2.00 - | 666 | brutto 2.00 - |
673 | deposit fee 0.01 * 2 - | 667 | deposit fee 0.01 * 2 - |
674 | wire fee 0.01 | 668 | wire fee 0.01 |
675 | */ | 669 | */"EUR:1.97", |
676 | "EUR:1.97", | ||
677 | EXCHANGE_ACCOUNT_NO, | 670 | EXCHANGE_ACCOUNT_NO, |
678 | MERCHANT_ACCOUNT_NO), | 671 | MERCHANT_ACCOUNT_NO), |
679 | TALER_TESTING_cmd_modify_object_dl | 672 | TALER_TESTING_cmd_modify_object_dl |
@@ -776,8 +769,7 @@ run (void *cls, | |||
776 | brutto 2.00 - | 769 | brutto 2.00 - |
777 | deposit fee 0.01 * 2 - | 770 | deposit fee 0.01 * 2 - |
778 | wire fee 0.01 | 771 | wire fee 0.01 |
779 | */ | 772 | */"EUR:1.97", |
780 | "EUR:1.97", | ||
781 | EXCHANGE_ACCOUNT_NO, | 773 | EXCHANGE_ACCOUNT_NO, |
782 | MERCHANT_ACCOUNT_NO), | 774 | MERCHANT_ACCOUNT_NO), |
783 | 775 | ||
@@ -786,16 +778,13 @@ run (void *cls, | |||
786 | * coin contributes 0.99 to the final wire transfer. The | 778 | * coin contributes 0.99 to the final wire transfer. The |
787 | * wire transfer itself drains 0.01-EUR from the total amount. | 779 | * wire transfer itself drains 0.01-EUR from the total amount. |
788 | * Therefore, wire transferring 1-EUR coin results in a net | 780 | * Therefore, wire transferring 1-EUR coin results in a net |
789 | * of: 0.99 - 0.01 = 0.98. */ | 781 | * of: 0.99 - 0.01 = 0.98. *//** |
790 | |||
791 | /** | ||
792 | * NOTE: the following two hacks aim at modifying the | 782 | * NOTE: the following two hacks aim at modifying the |
793 | * communication between the merchant and the exchange. | 783 | * communication between the merchant and the exchange. |
794 | * In particular, they are supposed to modify the call | 784 | * In particular, they are supposed to modify the call |
795 | * to /track/transfer issued from the merchant to the | 785 | * to /track/transfer issued from the merchant to the |
796 | * exchange that happens _before_ the call to /track/transaction | 786 | * exchange that happens _before_ the call to /track/transaction |
797 | * issued below by the test case (to the merchant backend.) */ | 787 | * issued below by the test case (to the merchant backend.) */TALER_TESTING_cmd_modify_object_dl |
798 | TALER_TESTING_cmd_modify_object_dl | ||
799 | ("hack-0", | 788 | ("hack-0", |
800 | PROXY_EXCHANGE_CONFIG_FILE, | 789 | PROXY_EXCHANGE_CONFIG_FILE, |
801 | "total", | 790 | "total", |
@@ -1042,6 +1031,7 @@ run (void *cls, | |||
1042 | fakebank_url); | 1031 | fakebank_url); |
1043 | } | 1032 | } |
1044 | 1033 | ||
1034 | |||
1045 | /** | 1035 | /** |
1046 | * Kill, wait, and destroy convenience function. | 1036 | * Kill, wait, and destroy convenience function. |
1047 | * | 1037 | * |
@@ -1137,4 +1127,5 @@ main (int argc, | |||
1137 | return 0; | 1127 | return 0; |
1138 | } | 1128 | } |
1139 | 1129 | ||
1130 | |||
1140 | /* end of test_merchant_api_twisted.c */ | 1131 | /* end of test_merchant_api_twisted.c */ |
diff --git a/src/lib/testing_api_cmd_history.c b/src/lib/testing_api_cmd_history.c index fc1b269f..5a776fc2 100644 --- a/src/lib/testing_api_cmd_history.c +++ b/src/lib/testing_api_cmd_history.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include "taler_merchant_testing_lib.h" | 30 | #include "taler_merchant_testing_lib.h" |
31 | 31 | ||
32 | 32 | ||
33 | |||
34 | /** | 33 | /** |
35 | * State for a "history" CMD. | 34 | * State for a "history" CMD. |
36 | */ | 35 | */ |
@@ -341,6 +340,7 @@ cmd_history2 (const char *label, | |||
341 | return cmd; | 340 | return cmd; |
342 | } | 341 | } |
343 | 342 | ||
343 | |||
344 | /** | 344 | /** |
345 | * Make a "history" command. | 345 | * Make a "history" command. |
346 | * | 346 | * |
diff --git a/src/lib/testing_api_cmd_pay.c b/src/lib/testing_api_cmd_pay.c index 3be5d8dd..3e9fa37b 100644 --- a/src/lib/testing_api_cmd_pay.c +++ b/src/lib/testing_api_cmd_pay.c | |||
@@ -352,6 +352,7 @@ check_payment_cb (void *cls, | |||
352 | TALER_TESTING_interpreter_next (cps->is); | 352 | TALER_TESTING_interpreter_next (cps->is); |
353 | } | 353 | } |
354 | 354 | ||
355 | |||
355 | /** | 356 | /** |
356 | * Run a /check-payment CMD. | 357 | * Run a /check-payment CMD. |
357 | * | 358 | * |
@@ -394,6 +395,7 @@ check_payment_run (void *cls, | |||
394 | GNUNET_assert (NULL != cps->cpo); | 395 | GNUNET_assert (NULL != cps->cpo); |
395 | } | 396 | } |
396 | 397 | ||
398 | |||
397 | /** | 399 | /** |
398 | * Make a "check payment" test command. | 400 | * Make a "check payment" test command. |
399 | * | 401 | * |
@@ -433,6 +435,7 @@ TALER_TESTING_cmd_check_payment (const char *label, | |||
433 | 435 | ||
434 | } | 436 | } |
435 | 437 | ||
438 | |||
436 | /** | 439 | /** |
437 | * Parse the @a coins specification and grow the @a pc | 440 | * Parse the @a coins specification and grow the @a pc |
438 | * array with the coins found, updating @a npc. | 441 | * array with the coins found, updating @a npc. |
@@ -636,6 +639,7 @@ pay_cb (void *cls, | |||
636 | TALER_TESTING_interpreter_next (ps->is); | 639 | TALER_TESTING_interpreter_next (ps->is); |
637 | } | 640 | } |
638 | 641 | ||
642 | |||
639 | /** | 643 | /** |
640 | * Callback for a "pay abort" operation. Mainly, check HTTP | 644 | * Callback for a "pay abort" operation. Mainly, check HTTP |
641 | * response code was as expected and stores refund permissions | 645 | * response code was as expected and stores refund permissions |
@@ -874,6 +878,7 @@ _pay_run (const char *merchant_url, | |||
874 | return ret; | 878 | return ret; |
875 | } | 879 | } |
876 | 880 | ||
881 | |||
877 | /** | 882 | /** |
878 | * Run a "pay" CMD. | 883 | * Run a "pay" CMD. |
879 | * | 884 | * |
@@ -903,6 +908,7 @@ pay_run (void *cls, | |||
903 | TALER_TESTING_FAIL (is); | 908 | TALER_TESTING_FAIL (is); |
904 | } | 909 | } |
905 | 910 | ||
911 | |||
906 | /** | 912 | /** |
907 | * Free a "pay" CMD, and cancel it if need be. | 913 | * Free a "pay" CMD, and cancel it if need be. |
908 | * | 914 | * |
@@ -949,9 +955,9 @@ pay_traits (void *cls, | |||
949 | const struct TALER_TESTING_Command *proposal_cmd; | 955 | const struct TALER_TESTING_Command *proposal_cmd; |
950 | struct GNUNET_CRYPTO_EddsaPublicKey *merchant_pub; | 956 | struct GNUNET_CRYPTO_EddsaPublicKey *merchant_pub; |
951 | 957 | ||
952 | if ( NULL == | 958 | if (NULL == |
953 | (proposal_cmd = TALER_TESTING_interpreter_lookup_command | 959 | (proposal_cmd = TALER_TESTING_interpreter_lookup_command |
954 | (ps->is, ps->proposal_reference))) | 960 | (ps->is, ps->proposal_reference))) |
955 | { | 961 | { |
956 | GNUNET_break (0); | 962 | GNUNET_break (0); |
957 | return GNUNET_SYSERR; | 963 | return GNUNET_SYSERR; |
@@ -998,6 +1004,7 @@ pay_traits (void *cls, | |||
998 | return GNUNET_SYSERR; | 1004 | return GNUNET_SYSERR; |
999 | } | 1005 | } |
1000 | 1006 | ||
1007 | |||
1001 | /** | 1008 | /** |
1002 | * Make a "pay" test command. | 1009 | * Make a "pay" test command. |
1003 | * | 1010 | * |
@@ -1073,6 +1080,7 @@ pay_abort_cleanup (void *cls, | |||
1073 | GNUNET_free (pas); | 1080 | GNUNET_free (pas); |
1074 | } | 1081 | } |
1075 | 1082 | ||
1083 | |||
1076 | /** | 1084 | /** |
1077 | * Run a "pay abort" CMD. | 1085 | * Run a "pay abort" CMD. |
1078 | * | 1086 | * |
@@ -1134,6 +1142,7 @@ pay_abort_run (void *cls, | |||
1134 | TALER_TESTING_FAIL (is); | 1142 | TALER_TESTING_FAIL (is); |
1135 | } | 1143 | } |
1136 | 1144 | ||
1145 | |||
1137 | /** | 1146 | /** |
1138 | * Offer internal data useful to other commands. | 1147 | * Offer internal data useful to other commands. |
1139 | * | 1148 | * |
@@ -1170,6 +1179,7 @@ pay_abort_traits (void *cls, | |||
1170 | return GNUNET_SYSERR; | 1179 | return GNUNET_SYSERR; |
1171 | } | 1180 | } |
1172 | 1181 | ||
1182 | |||
1173 | /** | 1183 | /** |
1174 | * Make a "pay abort" test command. | 1184 | * Make a "pay abort" test command. |
1175 | * | 1185 | * |
@@ -1204,6 +1214,7 @@ TALER_TESTING_cmd_pay_abort (const char *label, | |||
1204 | return cmd; | 1214 | return cmd; |
1205 | } | 1215 | } |
1206 | 1216 | ||
1217 | |||
1207 | /** | 1218 | /** |
1208 | * Function called with the result of a /pay again operation, | 1219 | * Function called with the result of a /pay again operation, |
1209 | * check signature and HTTP response code are good. | 1220 | * check signature and HTTP response code are good. |
@@ -1242,9 +1253,9 @@ pay_again_cb (void *cls, | |||
1242 | return; | 1253 | return; |
1243 | } | 1254 | } |
1244 | 1255 | ||
1245 | if ( NULL == | 1256 | if (NULL == |
1246 | (pay_cmd = TALER_TESTING_interpreter_lookup_command | 1257 | (pay_cmd = TALER_TESTING_interpreter_lookup_command |
1247 | (pas->is, pas->pay_reference))) | 1258 | (pas->is, pas->pay_reference))) |
1248 | TALER_TESTING_FAIL (pas->is); | 1259 | TALER_TESTING_FAIL (pas->is); |
1249 | 1260 | ||
1250 | if (MHD_HTTP_OK == http_status) | 1261 | if (MHD_HTTP_OK == http_status) |
@@ -1287,6 +1298,7 @@ pay_again_cb (void *cls, | |||
1287 | TALER_TESTING_interpreter_next (pas->is); | 1298 | TALER_TESTING_interpreter_next (pas->is); |
1288 | } | 1299 | } |
1289 | 1300 | ||
1301 | |||
1290 | /** | 1302 | /** |
1291 | * Run a "pay again" CMD. | 1303 | * Run a "pay again" CMD. |
1292 | * | 1304 | * |
@@ -1337,6 +1349,7 @@ pay_again_run (void *cls, | |||
1337 | TALER_TESTING_FAIL (is); | 1349 | TALER_TESTING_FAIL (is); |
1338 | } | 1350 | } |
1339 | 1351 | ||
1352 | |||
1340 | /** | 1353 | /** |
1341 | * Free and possibly cancel a "pay again" CMD. | 1354 | * Free and possibly cancel a "pay again" CMD. |
1342 | * | 1355 | * |
@@ -1361,6 +1374,7 @@ pay_again_cleanup (void *cls, | |||
1361 | GNUNET_free (pas); | 1374 | GNUNET_free (pas); |
1362 | } | 1375 | } |
1363 | 1376 | ||
1377 | |||
1364 | /** | 1378 | /** |
1365 | * Make a "pay again" test command. Its purpose is to | 1379 | * Make a "pay again" test command. Its purpose is to |
1366 | * take all the data from a aborted "pay" CMD, and use | 1380 | * take all the data from a aborted "pay" CMD, and use |
@@ -1442,6 +1456,7 @@ abort_refund_cb (void *cls, | |||
1442 | TALER_TESTING_interpreter_next (pars->is); | 1456 | TALER_TESTING_interpreter_next (pars->is); |
1443 | } | 1457 | } |
1444 | 1458 | ||
1459 | |||
1445 | /** | 1460 | /** |
1446 | * Free the state of a "pay abort refund" CMD, and possibly | 1461 | * Free the state of a "pay abort refund" CMD, and possibly |
1447 | * cancel a pending operation. | 1462 | * cancel a pending operation. |
@@ -1466,6 +1481,7 @@ pay_abort_refund_cleanup (void *cls, | |||
1466 | GNUNET_free (pars); | 1481 | GNUNET_free (pars); |
1467 | } | 1482 | } |
1468 | 1483 | ||
1484 | |||
1469 | /** | 1485 | /** |
1470 | * Run a "pay abort refund" CMD. | 1486 | * Run a "pay abort refund" CMD. |
1471 | * | 1487 | * |
@@ -1489,9 +1505,9 @@ pay_abort_refund_run (void *cls, | |||
1489 | 1505 | ||
1490 | pars->is = is; | 1506 | pars->is = is; |
1491 | 1507 | ||
1492 | if ( NULL == | 1508 | if (NULL == |
1493 | (abort_cmd = TALER_TESTING_interpreter_lookup_command | 1509 | (abort_cmd = TALER_TESTING_interpreter_lookup_command |
1494 | (is, pars->abort_reference)) ) | 1510 | (is, pars->abort_reference)) ) |
1495 | TALER_TESTING_FAIL (is); | 1511 | TALER_TESTING_FAIL (is); |
1496 | 1512 | ||
1497 | if (GNUNET_OK != TALER_TESTING_get_trait_uint | 1513 | if (GNUNET_OK != TALER_TESTING_get_trait_uint |
@@ -1576,4 +1592,5 @@ TALER_TESTING_cmd_pay_abort_refund | |||
1576 | return cmd; | 1592 | return cmd; |
1577 | } | 1593 | } |
1578 | 1594 | ||
1595 | |||
1579 | /* end of testing_api_cmd_pay.c */ | 1596 | /* end of testing_api_cmd_pay.c */ |
diff --git a/src/lib/testing_api_cmd_proposal.c b/src/lib/testing_api_cmd_proposal.c index f5e282c9..5e1f4ebb 100644 --- a/src/lib/testing_api_cmd_proposal.c +++ b/src/lib/testing_api_cmd_proposal.c | |||
@@ -418,6 +418,7 @@ proposal_cleanup (void *cls, | |||
418 | GNUNET_free (ps); | 418 | GNUNET_free (ps); |
419 | } | 419 | } |
420 | 420 | ||
421 | |||
421 | /** | 422 | /** |
422 | * Free the state of a "proposal lookup" CMD, and possibly | 423 | * Free the state of a "proposal lookup" CMD, and possibly |
423 | * cancel it if it did not complete. | 424 | * cancel it if it did not complete. |
@@ -477,6 +478,7 @@ TALER_TESTING_cmd_proposal (const char *label, | |||
477 | return cmd; | 478 | return cmd; |
478 | } | 479 | } |
479 | 480 | ||
481 | |||
480 | /** | 482 | /** |
481 | * Callback for "proposal lookup" operation, to check the | 483 | * Callback for "proposal lookup" operation, to check the |
482 | * response code is as expected. | 484 | * response code is as expected. |
diff --git a/src/lib/testing_api_cmd_refund.c b/src/lib/testing_api_cmd_refund.c index 9bd30cc7..f592f6a1 100644 --- a/src/lib/testing_api_cmd_refund.c +++ b/src/lib/testing_api_cmd_refund.c | |||
@@ -172,6 +172,7 @@ refund_lookup_cleanup (void *cls, | |||
172 | GNUNET_free (rls); | 172 | GNUNET_free (rls); |
173 | } | 173 | } |
174 | 174 | ||
175 | |||
175 | /** | 176 | /** |
176 | * Process POST /refund (increase) response; just checking | 177 | * Process POST /refund (increase) response; just checking |
177 | * if the HTTP response code is the one expected. | 178 | * if the HTTP response code is the one expected. |
@@ -226,6 +227,7 @@ refund_increase_run (void *cls, | |||
226 | GNUNET_assert (NULL != ris->rio); | 227 | GNUNET_assert (NULL != ris->rio); |
227 | } | 228 | } |
228 | 229 | ||
230 | |||
229 | /** | 231 | /** |
230 | * Callback that frees all the elements in the hashmap | 232 | * Callback that frees all the elements in the hashmap |
231 | * | 233 | * |
@@ -322,9 +324,9 @@ refund_lookup_cb (void *cls, | |||
322 | 324 | ||
323 | /* Compare spent coins with refunded, and if they match, | 325 | /* Compare spent coins with refunded, and if they match, |
324 | * increase an accumulator. */ | 326 | * increase an accumulator. */ |
325 | if ( NULL == | 327 | if (NULL == |
326 | (pay_cmd = TALER_TESTING_interpreter_lookup_command | 328 | (pay_cmd = TALER_TESTING_interpreter_lookup_command |
327 | (rls->is, rls->pay_reference))) | 329 | (rls->is, rls->pay_reference))) |
328 | TALER_TESTING_FAIL (rls->is); | 330 | TALER_TESTING_FAIL (rls->is); |
329 | 331 | ||
330 | if (GNUNET_OK != TALER_TESTING_get_trait_coin_reference | 332 | if (GNUNET_OK != TALER_TESTING_get_trait_coin_reference |
@@ -344,9 +346,9 @@ refund_lookup_cb (void *cls, | |||
344 | struct TALER_Amount *iamount; | 346 | struct TALER_Amount *iamount; |
345 | const struct TALER_TESTING_Command *icoin_cmd; | 347 | const struct TALER_TESTING_Command *icoin_cmd; |
346 | 348 | ||
347 | if ( NULL == | 349 | if (NULL == |
348 | (icoin_cmd = TALER_TESTING_interpreter_lookup_command | 350 | (icoin_cmd = TALER_TESTING_interpreter_lookup_command |
349 | (rls->is, icoin_reference)) ) | 351 | (rls->is, icoin_reference)) ) |
350 | { | 352 | { |
351 | GNUNET_break (0); | 353 | GNUNET_break (0); |
352 | TALER_LOG_ERROR ("Bad reference `%s'\n", | 354 | TALER_LOG_ERROR ("Bad reference `%s'\n", |
@@ -486,6 +488,7 @@ refund_increase_traits (void *cls, | |||
486 | return GNUNET_SYSERR; | 488 | return GNUNET_SYSERR; |
487 | } | 489 | } |
488 | 490 | ||
491 | |||
489 | /** | 492 | /** |
490 | * Define a "refund increase" CMD. | 493 | * Define a "refund increase" CMD. |
491 | * | 494 | * |
@@ -531,6 +534,7 @@ TALER_TESTING_cmd_refund_increase | |||
531 | return cmd; | 534 | return cmd; |
532 | } | 535 | } |
533 | 536 | ||
537 | |||
534 | /** | 538 | /** |
535 | * Define a "refund lookup" CMD. | 539 | * Define a "refund lookup" CMD. |
536 | * | 540 | * |
@@ -628,4 +632,5 @@ TALER_TESTING_cmd_refund_lookup_with_amount | |||
628 | return cmd; | 632 | return cmd; |
629 | } | 633 | } |
630 | 634 | ||
635 | |||
631 | /* end of testing_api_cmd_refund.c */ | 636 | /* end of testing_api_cmd_refund.c */ |
diff --git a/src/lib/testing_api_cmd_rewind.c b/src/lib/testing_api_cmd_rewind.c index ba694b8c..2e43b75f 100644 --- a/src/lib/testing_api_cmd_rewind.c +++ b/src/lib/testing_api_cmd_rewind.c | |||
@@ -83,6 +83,7 @@ rewind_ip_run (void *cls, | |||
83 | TALER_TESTING_interpreter_next (is); | 83 | TALER_TESTING_interpreter_next (is); |
84 | } | 84 | } |
85 | 85 | ||
86 | |||
86 | /** | 87 | /** |
87 | * Make the instruction pointer point to @a new_ip | 88 | * Make the instruction pointer point to @a new_ip |
88 | * only if @a counter is greater than zero. | 89 | * only if @a counter is greater than zero. |
diff --git a/src/lib/testing_api_cmd_tip.c b/src/lib/testing_api_cmd_tip.c index 77ab919e..41757b6f 100644 --- a/src/lib/testing_api_cmd_tip.c +++ b/src/lib/testing_api_cmd_tip.c | |||
@@ -280,6 +280,7 @@ tip_authorize_cb (void *cls, | |||
280 | TALER_TESTING_interpreter_next (tas->is); | 280 | TALER_TESTING_interpreter_next (tas->is); |
281 | } | 281 | } |
282 | 282 | ||
283 | |||
283 | /** | 284 | /** |
284 | * Offers information from the /tip-authorize CMD state to other | 285 | * Offers information from the /tip-authorize CMD state to other |
285 | * commands. | 286 | * commands. |
@@ -436,7 +437,6 @@ TALER_TESTING_cmd_tip_authorize_with_ec | |||
436 | } | 437 | } |
437 | 438 | ||
438 | 439 | ||
439 | |||
440 | /** | 440 | /** |
441 | * Create a /tip-authorize CMD. | 441 | * Create a /tip-authorize CMD. |
442 | * | 442 | * |
@@ -478,6 +478,7 @@ TALER_TESTING_cmd_tip_authorize (const char *label, | |||
478 | return cmd; | 478 | return cmd; |
479 | } | 479 | } |
480 | 480 | ||
481 | |||
481 | /** | 482 | /** |
482 | * Callback to process a GET /tip-query request, it mainly | 483 | * Callback to process a GET /tip-query request, it mainly |
483 | * checks that what the backend returned matches the command's | 484 | * checks that what the backend returned matches the command's |
@@ -575,6 +576,7 @@ tip_query_cb (void *cls, | |||
575 | TALER_TESTING_interpreter_next (tqs->is); | 576 | TALER_TESTING_interpreter_next (tqs->is); |
576 | } | 577 | } |
577 | 578 | ||
579 | |||
578 | /** | 580 | /** |
579 | * Free the state from a /tip-query CMD, and possibly cancel | 581 | * Free the state from a /tip-query CMD, and possibly cancel |
580 | * a pending /tip-query request. | 582 | * a pending /tip-query request. |
@@ -597,6 +599,7 @@ tip_query_cleanup (void *cls, | |||
597 | GNUNET_free (tqs); | 599 | GNUNET_free (tqs); |
598 | } | 600 | } |
599 | 601 | ||
602 | |||
600 | /** | 603 | /** |
601 | * Run a /tip-query CMD. | 604 | * Run a /tip-query CMD. |
602 | * | 605 | * |
@@ -695,6 +698,7 @@ TALER_TESTING_cmd_tip_query (const char *label, | |||
695 | return cmd; | 698 | return cmd; |
696 | } | 699 | } |
697 | 700 | ||
701 | |||
698 | /** | 702 | /** |
699 | * Internal withdraw handle used when withdrawing tips. | 703 | * Internal withdraw handle used when withdrawing tips. |
700 | */ | 704 | */ |
@@ -903,14 +907,15 @@ tip_pickup_run (void *cls, | |||
903 | /* Count planchets. */ | 907 | /* Count planchets. */ |
904 | for (num_planchets = 0; | 908 | for (num_planchets = 0; |
905 | NULL != tps->amounts[num_planchets]; | 909 | NULL != tps->amounts[num_planchets]; |
906 | num_planchets++); | 910 | num_planchets++) |
911 | ; | ||
907 | } | 912 | } |
908 | else | 913 | else |
909 | { | 914 | { |
910 | const unsigned int *np; | 915 | const unsigned int *np; |
911 | if ( NULL == /* looking for "parent" tip-pickup command */ | 916 | if (NULL == /* looking for "parent" tip-pickup command */ |
912 | (replay_cmd = TALER_TESTING_interpreter_lookup_command | 917 | (replay_cmd = TALER_TESTING_interpreter_lookup_command |
913 | (is, tps->replay_reference)) ) | 918 | (is, tps->replay_reference)) ) |
914 | TALER_TESTING_FAIL (is); | 919 | TALER_TESTING_FAIL (is); |
915 | 920 | ||
916 | if (GNUNET_OK != TALER_TESTING_get_trait_uint | 921 | if (GNUNET_OK != TALER_TESTING_get_trait_uint |
@@ -994,6 +999,7 @@ tip_pickup_run (void *cls, | |||
994 | } | 999 | } |
995 | } | 1000 | } |
996 | 1001 | ||
1002 | |||
997 | /** | 1003 | /** |
998 | * Free a /tip-pickup CMD state, and possibly cancel a | 1004 | * Free a /tip-pickup CMD state, and possibly cancel a |
999 | * pending /tip-pickup request. | 1005 | * pending /tip-pickup request. |
@@ -1126,6 +1132,7 @@ TALER_TESTING_cmd_tip_pickup_with_ec | |||
1126 | return cmd; | 1132 | return cmd; |
1127 | } | 1133 | } |
1128 | 1134 | ||
1135 | |||
1129 | /** | 1136 | /** |
1130 | * Define a /tip-pickup CMD. | 1137 | * Define a /tip-pickup CMD. |
1131 | * | 1138 | * |
@@ -1165,6 +1172,7 @@ TALER_TESTING_cmd_tip_pickup | |||
1165 | return cmd; | 1172 | return cmd; |
1166 | } | 1173 | } |
1167 | 1174 | ||
1175 | |||
1168 | /** | 1176 | /** |
1169 | * This commands does not query the backend at all, | 1177 | * This commands does not query the backend at all, |
1170 | * but just makes up a fake authorization id that will | 1178 | * but just makes up a fake authorization id that will |
@@ -1193,4 +1201,5 @@ TALER_TESTING_cmd_tip_authorize_fake (const char *label) | |||
1193 | return cmd; | 1201 | return cmd; |
1194 | } | 1202 | } |
1195 | 1203 | ||
1204 | |||
1196 | /* end of testing_api_cmd_tip.c */ | 1205 | /* end of testing_api_cmd_tip.c */ |
diff --git a/src/lib/testing_api_cmd_track.c b/src/lib/testing_api_cmd_track.c index 8d5f7e76..a651a507 100644 --- a/src/lib/testing_api_cmd_track.c +++ b/src/lib/testing_api_cmd_track.c | |||
@@ -184,6 +184,7 @@ track_transaction_cb (void *cls, | |||
184 | TALER_TESTING_interpreter_next (tts->is); | 184 | TALER_TESTING_interpreter_next (tts->is); |
185 | } | 185 | } |
186 | 186 | ||
187 | |||
187 | /** | 188 | /** |
188 | * Callback for a /track/transfer operation, only checks if | 189 | * Callback for a /track/transfer operation, only checks if |
189 | * response code is the expected one. | 190 | * response code is the expected one. |
@@ -341,7 +342,6 @@ track_transfer_cb | |||
341 | } | 342 | } |
342 | 343 | ||
343 | 344 | ||
344 | |||
345 | /** | 345 | /** |
346 | * Run the "track transfer" CMD. | 346 | * Run the "track transfer" CMD. |
347 | * | 347 | * |
@@ -381,6 +381,7 @@ track_transfer_run (void *cls, | |||
381 | GNUNET_assert (NULL != tts->tth); | 381 | GNUNET_assert (NULL != tts->tth); |
382 | } | 382 | } |
383 | 383 | ||
384 | |||
384 | /** | 385 | /** |
385 | * Run the "track transaction" CMD. | 386 | * Run the "track transaction" CMD. |
386 | * | 387 | * |
@@ -399,9 +400,9 @@ track_transaction_run (void *cls, | |||
399 | const struct TALER_TESTING_Command *pay_cmd; | 400 | const struct TALER_TESTING_Command *pay_cmd; |
400 | 401 | ||
401 | tts->is = is; | 402 | tts->is = is; |
402 | if ( NULL == | 403 | if (NULL == |
403 | (pay_cmd = TALER_TESTING_interpreter_lookup_command | 404 | (pay_cmd = TALER_TESTING_interpreter_lookup_command |
404 | (is, tts->pay_reference))) | 405 | (is, tts->pay_reference))) |
405 | TALER_TESTING_FAIL (is); | 406 | TALER_TESTING_FAIL (is); |
406 | 407 | ||
407 | if (GNUNET_OK != TALER_TESTING_get_trait_order_id | 408 | if (GNUNET_OK != TALER_TESTING_get_trait_order_id |
@@ -442,6 +443,7 @@ track_transfer_cleanup (void *cls, | |||
442 | GNUNET_free (tts); | 443 | GNUNET_free (tts); |
443 | } | 444 | } |
444 | 445 | ||
446 | |||
445 | /** | 447 | /** |
446 | * Free the state of a "track transaction" CMD, and possibly | 448 | * Free the state of a "track transaction" CMD, and possibly |
447 | * cancel a pending operation thereof. | 449 | * cancel a pending operation thereof. |
@@ -513,6 +515,7 @@ track_transaction_traits (void *cls, | |||
513 | return GNUNET_SYSERR; | 515 | return GNUNET_SYSERR; |
514 | } | 516 | } |
515 | 517 | ||
518 | |||
516 | /** | 519 | /** |
517 | * Define a "track transaction" CMD. | 520 | * Define a "track transaction" CMD. |
518 | * | 521 | * |
@@ -585,4 +588,5 @@ TALER_TESTING_cmd_merchant_track_transfer | |||
585 | return cmd; | 588 | return cmd; |
586 | } | 589 | } |
587 | 590 | ||
591 | |||
588 | /* end of testing_api_cmd_track.c */ | 592 | /* end of testing_api_cmd_track.c */ |
diff --git a/src/lib/testing_api_helpers.c b/src/lib/testing_api_helpers.c index 520600fb..326bfcb8 100644 --- a/src/lib/testing_api_helpers.c +++ b/src/lib/testing_api_helpers.c | |||
@@ -188,7 +188,6 @@ TALER_TESTING_prepare_merchant (const char *config_filename) | |||
188 | GNUNET_OS_process_destroy (dbinit_proc); | 188 | GNUNET_OS_process_destroy (dbinit_proc); |
189 | 189 | ||
190 | 190 | ||
191 | |||
192 | GNUNET_asprintf (&base_url, | 191 | GNUNET_asprintf (&base_url, |
193 | "http://localhost:%llu/", | 192 | "http://localhost:%llu/", |
194 | port); | 193 | port); |
diff --git a/src/lib/testing_api_trait_merchant_sig.c b/src/lib/testing_api_trait_merchant_sig.c index 4b4e0710..5a2f5ebb 100644 --- a/src/lib/testing_api_trait_merchant_sig.c +++ b/src/lib/testing_api_trait_merchant_sig.c | |||
@@ -50,6 +50,7 @@ TALER_TESTING_get_trait_merchant_sig | |||
50 | index); | 50 | index); |
51 | } | 51 | } |
52 | 52 | ||
53 | |||
53 | /** | 54 | /** |
54 | * Offer a merchant signature over a contract. | 55 | * Offer a merchant signature over a contract. |
55 | * | 56 | * |
@@ -72,4 +73,5 @@ TALER_TESTING_make_trait_merchant_sig | |||
72 | return ret; | 73 | return ret; |
73 | } | 74 | } |
74 | 75 | ||
76 | |||
75 | /* end of testing_api_trait_merchant_sig.c */ | 77 | /* end of testing_api_trait_merchant_sig.c */ |
diff --git a/src/lib/testing_api_trait_planchet.c b/src/lib/testing_api_trait_planchet.c index d290e8ea..165ce818 100644 --- a/src/lib/testing_api_trait_planchet.c +++ b/src/lib/testing_api_trait_planchet.c | |||
@@ -49,6 +49,7 @@ TALER_TESTING_get_trait_planchet_secrets | |||
49 | index); | 49 | index); |
50 | } | 50 | } |
51 | 51 | ||
52 | |||
52 | /** | 53 | /** |
53 | * Offer planchet secrets. | 54 | * Offer planchet secrets. |
54 | * | 55 | * |
@@ -70,4 +71,5 @@ TALER_TESTING_make_trait_planchet_secrets | |||
70 | return ret; | 71 | return ret; |
71 | } | 72 | } |
72 | 73 | ||
74 | |||
73 | /* end of testing_api_trait_planchet.c */ | 75 | /* end of testing_api_trait_planchet.c */ |
diff --git a/src/lib/testing_api_trait_refund_entry.c b/src/lib/testing_api_trait_refund_entry.c index bc947e2b..6a27cfbd 100644 --- a/src/lib/testing_api_trait_refund_entry.c +++ b/src/lib/testing_api_trait_refund_entry.c | |||
@@ -52,6 +52,7 @@ TALER_TESTING_get_trait_refund_entry | |||
52 | index); | 52 | index); |
53 | } | 53 | } |
54 | 54 | ||
55 | |||
55 | /** | 56 | /** |
56 | * Offer refund entry. | 57 | * Offer refund entry. |
57 | * | 58 | * |
diff --git a/src/merchant-tools/taler-merchant-benchmark.c b/src/merchant-tools/taler-merchant-benchmark.c index f1e3b578..dedcc220 100644 --- a/src/merchant-tools/taler-merchant-benchmark.c +++ b/src/merchant-tools/taler-merchant-benchmark.c | |||
@@ -527,6 +527,7 @@ run (void *cls, | |||
527 | result = 1; | 527 | result = 1; |
528 | } | 528 | } |
529 | 529 | ||
530 | |||
530 | /** | 531 | /** |
531 | * Send SIGTERM and wait for process termination. | 532 | * Send SIGTERM and wait for process termination. |
532 | * | 533 | * |
@@ -540,6 +541,7 @@ terminate_process (struct GNUNET_OS_Process *process) | |||
540 | GNUNET_OS_process_destroy (process); | 541 | GNUNET_OS_process_destroy (process); |
541 | } | 542 | } |
542 | 543 | ||
544 | |||
543 | /** | 545 | /** |
544 | * The main function of the serve tool | 546 | * The main function of the serve tool |
545 | * | 547 | * |
@@ -588,8 +590,7 @@ main (int argc, | |||
588 | * is no way - yet? - to get the merchant base url. | 590 | * is no way - yet? - to get the merchant base url. |
589 | * Clearly, we could introduce a merchant_base_url | 591 | * Clearly, we could introduce a merchant_base_url |
590 | * value into the configuration. | 592 | * value into the configuration. |
591 | */ | 593 | */GNUNET_GETOPT_option_string |
592 | GNUNET_GETOPT_option_string | ||
593 | ('m', | 594 | ('m', |
594 | "merchant-url", | 595 | "merchant-url", |
595 | "MU", | 596 | "MU", |
@@ -657,8 +658,7 @@ main (int argc, | |||
657 | * is no way - yet? - to get the merchant base url. | 658 | * is no way - yet? - to get the merchant base url. |
658 | * Clearly, we could introduce a merchant_base_url | 659 | * Clearly, we could introduce a merchant_base_url |
659 | * value into the configuration. | 660 | * value into the configuration. |
660 | */ | 661 | */GNUNET_GETOPT_option_string |
661 | GNUNET_GETOPT_option_string | ||
662 | ('m', | 662 | ('m', |
663 | "merchant-url", | 663 | "merchant-url", |
664 | "MU", | 664 | "MU", |
@@ -773,9 +773,9 @@ main (int argc, | |||
773 | return MISSING_BANK_URL; | 773 | return MISSING_BANK_URL; |
774 | } | 774 | } |
775 | 775 | ||
776 | if ( NULL == (bankd = TALER_TESTING_run_bank | 776 | if (NULL == (bankd = TALER_TESTING_run_bank |
777 | (cfg_filename, | 777 | (cfg_filename, |
778 | bank_url))) | 778 | bank_url))) |
779 | { | 779 | { |
780 | TALER_LOG_ERROR ("Failed to run the bank\n"); | 780 | TALER_LOG_ERROR ("Failed to run the bank\n"); |
781 | terminate_process (merchantd); | 781 | terminate_process (merchantd); |