[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] branch master updated: describe meaning of
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] branch master updated: describe meaning of return values in comments, use corret return values |
Date: |
Mon, 06 Mar 2017 13:34:56 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 9a6e0ae describe meaning of return values in comments, use corret
return values
9a6e0ae is described below
commit 9a6e0aeb07f6d5d17201e8630d0958b4275a31eb
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Mar 6 13:36:30 2017 +0100
describe meaning of return values in comments, use corret return values
---
src/backend/taler-merchant-httpd_pay.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_pay.c
b/src/backend/taler-merchant-httpd_pay.c
index f2773ed..36d0834 100644
--- a/src/backend/taler-merchant-httpd_pay.c
+++ b/src/backend/taler-merchant-httpd_pay.c
@@ -914,7 +914,13 @@ get_instance (struct json_t *json);
*
* Schedules an error response in the connection on failure.
*
- * @return #GNUNET_YES on success
+ *
+ * @param connection HTTP connection we are receiving payment on
+ * @param root JSON upload with payment data
+ * @param pc context we use to handle the payment
+ * @return #GNUNET_OK on success,
+ * #GNUNET_NO on failure (response was queued with MHD)
+ * #GNUNET_SYSERR on hard error (MHD connection must be dropped)
*/
static int
parse_pay (struct MHD_Connection *connection,
@@ -1162,6 +1168,12 @@ parse_pay (struct MHD_Connection *connection,
/**
* Process a payment for a proposal.
+ *
+ * @param connection HTTP connection we are receiving payment on
+ * @param root JSON upload with payment data
+ * @param pc context we use to handle the payment
+ * @return value to return to MHD (#MHD_NO to drop connection,
+ * #MHD_YES to keep handling it)
*/
static int
handler_pay_json (struct MHD_Connection *connection,
@@ -1176,7 +1188,7 @@ handler_pay_json (struct MHD_Connection *connection,
root,
pc);
if (GNUNET_OK != ret)
- return ret;
+ return (GNUNET_NO == ret) ? MHD_YES : MHD_NO;
/* Check if this payment attempt has already succeeded */
if (GNUNET_SYSERR ==
@@ -1287,7 +1299,7 @@ handler_pay_json (struct MHD_Connection *connection,
pc->timeout_task = GNUNET_SCHEDULER_add_delayed (PAY_TIMEOUT,
&handle_pay_timeout,
pc);
- return GNUNET_OK;
+ return MHD_YES;
}
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant] branch master updated: describe meaning of return values in comments, use corret return values,
gnunet <=