diff options
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-get-orders.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-get-orders.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/backend/taler-merchant-httpd_private-get-orders.c b/src/backend/taler-merchant-httpd_private-get-orders.c index 509a5b60..3504105c 100644 --- a/src/backend/taler-merchant-httpd_private-get-orders.c +++ b/src/backend/taler-merchant-httpd_private-get-orders.c @@ -118,7 +118,7 @@ TMH_force_get_orders_resume (struct TMH_MerchantInstance *mi) while (NULL != (po = mi->po_head)) { - GNUNET_assert(po->in_dll); + GNUNET_assert (po->in_dll); GNUNET_CONTAINER_DLL_remove (mi->po_head, mi->po_tail, po); @@ -173,7 +173,7 @@ order_timeout (void *cls) GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Resuming long polled job due to timeout\n"); mi = po->mi; - GNUNET_assert(po->in_dll); + GNUNET_assert (po->in_dll); GNUNET_CONTAINER_DLL_remove (mi->po_head, mi->po_tail, po); @@ -199,7 +199,7 @@ cleanup (void *ctx) struct TMH_PendingOrder *po = ctx; if (po->in_dll) - { + { struct TMH_MerchantInstance *mi = po->mi; GNUNET_CONTAINER_DLL_remove (mi->po_head, @@ -321,6 +321,7 @@ add_order (void *cls, struct GNUNET_TIME_Absolute rd; struct GNUNET_JSON_Specification spec[] = { TALER_JSON_spec_amount ("amount", + TMH_currency, &order_amount), GNUNET_JSON_spec_absolute_time ("refund_deadline", &rd), @@ -338,7 +339,7 @@ add_order (void *cls, return; } - if (GNUNET_TIME_absolute_is_future(rd) && + if (GNUNET_TIME_absolute_is_future (rd) && paid) { struct TALER_Amount refund_amount; @@ -444,7 +445,7 @@ TMH_notify_order_change (struct TMH_MerchantInstance *mi, order_id, order_serial_id, date); - GNUNET_assert(po->in_dll); + GNUNET_assert (po->in_dll); GNUNET_CONTAINER_DLL_remove (mi->po_head, mi->po_tail, po); @@ -537,7 +538,7 @@ TMH_private_get_orders (const struct TMH_RequestHandler *rh, &ll, &dummy)) { - GNUNET_break_op (0); + GNUNET_break_op (0); return TALER_MHD_reply_with_error (connection, MHD_HTTP_BAD_REQUEST, TALER_EC_GENERIC_PARAMETER_MALFORMED, @@ -547,7 +548,7 @@ TMH_private_get_orders (const struct TMH_RequestHandler *rh, if ( (-MAX_DELTA > of.delta) || (of.delta > MAX_DELTA) ) { - GNUNET_break_op (0); + GNUNET_break_op (0); return TALER_MHD_reply_with_error (connection, MHD_HTTP_BAD_REQUEST, TALER_EC_GENERIC_PARAMETER_MALFORMED, @@ -586,8 +587,8 @@ TMH_private_get_orders (const struct TMH_RequestHandler *rh, "date_ms"); } - of.date = GNUNET_TIME_absolute_from_ms(ll); - if (GNUNET_TIME_absolute_is_never(of.date)) + of.date = GNUNET_TIME_absolute_from_ms (ll); + if (GNUNET_TIME_absolute_is_never (of.date)) { GNUNET_break_op (0); return TALER_MHD_reply_with_error (connection, @@ -627,7 +628,7 @@ TMH_private_get_orders (const struct TMH_RequestHandler *rh, of.start_row = (uint64_t) ull; if (INT64_MAX < of.start_row) { - GNUNET_break_op (0); + GNUNET_break_op (0); return TALER_MHD_reply_with_error (connection, MHD_HTTP_BAD_REQUEST, TALER_EC_GENERIC_PARAMETER_MALFORMED, @@ -661,7 +662,7 @@ TMH_private_get_orders (const struct TMH_RequestHandler *rh, "timeout_ms"); of.timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, ull); - if (GNUNET_TIME_relative_is_forever(of.timeout)) + if (GNUNET_TIME_relative_is_forever (of.timeout)) { GNUNET_break_op (0); return TALER_MHD_reply_with_error (connection, @@ -672,7 +673,7 @@ TMH_private_get_orders (const struct TMH_RequestHandler *rh, } if ( (0 >= of.delta) && - (! GNUNET_TIME_relative_is_zero(of.timeout)) ) + (! GNUNET_TIME_relative_is_zero (of.timeout)) ) { GNUNET_break_op (0); of.timeout = GNUNET_TIME_UNIT_ZERO; @@ -706,7 +707,7 @@ TMH_private_get_orders (const struct TMH_RequestHandler *rh, NULL); } if ( (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) && - (! GNUNET_TIME_relative_is_zero(of.timeout)) ) + (! GNUNET_TIME_relative_is_zero (of.timeout)) ) { struct TMH_MerchantInstance *mi = hc->instance; @@ -722,7 +723,7 @@ TMH_private_get_orders (const struct TMH_RequestHandler *rh, GNUNET_CONTAINER_DLL_insert (mi->po_head, mi->po_tail, po); - po->in_dll=true; + po->in_dll = true; MHD_suspend_connection (connection); { struct TMH_PendingOrder *pot; |