[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-donau] branch master updated: [lib] batch-issue compiles
From: |
gnunet |
Subject: |
[taler-donau] branch master updated: [lib] batch-issue compiles |
Date: |
Wed, 13 Mar 2024 10:12:48 +0100 |
This is an automated email from the git hooks/post-receive script.
lukas-matyja pushed a commit to branch master
in repository donau.
The following commit(s) were added to refs/heads/master by this push:
new e5a5b6d [lib] batch-issue compiles
e5a5b6d is described below
commit e5a5b6d566433dc59eebc275e75023790b0b1fbe
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
AuthorDate: Wed Mar 13 10:13:35 2024 +0100
[lib] batch-issue compiles
---
src/lib/Makefile.am | 4 ++--
src/lib/donau_api_batch_issue_receipts.c | 26 +++++++++++++++-----------
2 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index b5df8ad..6d73e03 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -25,8 +25,8 @@ libdonau_la_SOURCES = \
donau_api_charity_post.c \
donau_api_charity_delete.c \
donau_api_charities_get.c \
- donau_api_curl_defaults.c donau_api_curl_defaults.h
- #donau_api_batch_issue_receipts.c
+ donau_api_curl_defaults.c donau_api_curl_defaults.h \
+ donau_api_batch_issue_receipts.c
## maybe need libtalercurl
libdonau_la_LIBADD = \
diff --git a/src/lib/donau_api_batch_issue_receipts.c
b/src/lib/donau_api_batch_issue_receipts.c
index f220b4e..df5e414 100644
--- a/src/lib/donau_api_batch_issue_receipts.c
+++ b/src/lib/donau_api_batch_issue_receipts.c
@@ -54,7 +54,7 @@ struct DONAU_BatchIssueReceiptHandle
/**
* Function to call with the result.
*/
- DONAU_PostCharityResponseCallback cb;
+ DONAU_BatchIssueReceiptsCallback cb;
/**
* BUDI-key-pair signature.
@@ -82,12 +82,16 @@ struct DONAU_BatchIssueReceiptHandle
* @param charity_sig signature from charity over @bkp
*/
json_t *
-budi_key_pair_to_json (const unsigned int num_bkp,
+issue_receipt_body_to_json (const unsigned int num_bkp,
const struct DONAU_BlindedUniqueDonationIdentifierKeyPair
*bkp[static num_bkp],
- const uint64_t year;
- const DONAU_CharitySignatureP *charity_sig)
+ const uint64_t year,
+ const struct DONAU_CharitySignatureP *charity_sig)
{
json_t *budikeypairs;
+
+ budikeypairs = json_array ();
+ GNUNET_assert (NULL != budikeypairs);
+
for (unsigned int i = 0; i < num_bkp; i++)
{
json_t *budikeypair;
@@ -95,7 +99,7 @@ budi_key_pair_to_json (const unsigned int num_bkp,
budikeypair = GNUNET_JSON_PACK (
GNUNET_JSON_pack_data_auto ("bkp",
&bkp[i]));
- GNUNET_assert (NULL != signkey);
+ GNUNET_assert (NULL != budikeypair);
GNUNET_assert (0 ==
json_array_append_new (budikeypairs,
budikeypair));
@@ -173,7 +177,7 @@ handle_batch_issue_finished (void *cls,
}
-struct DONAU_CharityPostHandle *
+struct DONAU_BatchIssueReceiptHandle *
DONAU_charity_issue_receipt (
struct GNUNET_CURL_Context *ctx,
const char *url,
@@ -186,26 +190,26 @@ DONAU_charity_issue_receipt (
void *cb_cls)
{
struct DONAU_BatchIssueReceiptHandle *birh;
+ birh = GNUNET_new (struct DONAU_BatchIssueReceiptHandle);
CURL *eh;
json_t *body;
// make signature over budi-key-pair
- DONAU_charity_budi_key_pair_sign(bkp, charity_priv, &birh->charity_sig);
+ DONAU_charity_budi_key_pair_sign(num_bkp, bkp, charity_priv,
&birh->charity_sig);
TALER_LOG_DEBUG ("Connecting to the donau (%s)\n",
url);
- birh = GNUNET_new (struct DONAU_BatchIssueReceiptHandle);
birh->url = GNUNET_strdup (url);
birh->cb = cb;
birh->cb_cls = cb_cls;
birh->ctx = ctx;
- char arg_str[sizeof (id) * 2 + 32];
+ char arg_str[sizeof (charity_id) * 2 + 32];
GNUNET_snprintf (arg_str,
sizeof (arg_str),
"batch-issue/%llu",
(unsigned long long)
- id);
- cgh->url = TALER_url_join (url,
+ charity_id);
+ birh->url = TALER_url_join (url,
arg_str,
NULL);
if (NULL == birh->url)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-donau] branch master updated: [lib] batch-issue compiles,
gnunet <=