gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-donau] branch master updated: [lib] rewrite compare function


From: gnunet
Subject: [taler-donau] branch master updated: [lib] rewrite compare function
Date: Tue, 31 Oct 2023 09:27:01 +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 9e60609  [lib] rewrite compare function
9e60609 is described below

commit 9e606094c964d708eb754932e3b44b2ce0c685f0
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
AuthorDate: Tue Oct 31 09:27:22 2023 +0100

    [lib] rewrite compare function
---
 src/lib/donau_api_handle.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/lib/donau_api_handle.c b/src/lib/donau_api_handle.c
index c8bd623..8ccc071 100644
--- a/src/lib/donau_api_handle.c
+++ b/src/lib/donau_api_handle.c
@@ -265,28 +265,29 @@ EXITIF_exit:
 
 
 /**
- * Compare two denomination keys.  Ignores revocation data.
+ * Compare two donation unit keys.
  *
- * @param denom1 first denomination key
- * @param denom2 second denomination key
+ * @param denom1 first donation unit key
+ * @param denom2 second donation unit key
  * @return 0 if the two keys are equal (not necessarily
  *  the same object), 1 otherwise.
  */
 static unsigned int
-denoms_cmp (const struct TALER_DONAU_DenomPublicKey *denom1,
-            const struct TALER_DONAU_DenomPublicKey *denom2)
+denoms_cmp (const struct TALER_DonationUnitInformation *du1,
+            const struct TALER_DonationUnitInformation *du2)
 {
   struct TALER_DONAU_DenomPublicKey tmp1;
   struct TALER_DONAU_DenomPublicKey tmp2;
 
   if (0 !=
-      TALER_denom_pub_cmp (&denom1->key,
-                           &denom2->key))
+      TALER_denom_pub_cmp (&du1->key,
+                           &du2->key))
     return 1;
-  tmp1 = *denom1;
-  tmp2 = *denom2;
-  tmp1.revoked = false;
-  tmp2.revoked = false;
+  tmp1 = *du1;
+  tmp2 = *du2;
+  if (tmp1.year != tmp2.year)
+    return 1;
+
   memset (&tmp1.key,
           0,
           sizeof (tmp1.key));

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]