gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated (ab1423d -> d0aaf88)


From: gnunet
Subject: [taler-anastasis] branch master updated (ab1423d -> d0aaf88)
Date: Wed, 14 Jul 2021 11:05:59 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a change to branch master
in repository anastasis.

    from ab1423d  -preserve secret name
     new d03964f  -update changelog
     new d0aaf88  fix database timestamp handling

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 debian/changelog                       |  8 ++++++++
 src/stasis/plugin_anastasis_postgres.c | 34 ++++++++++++++++++++--------------
 2 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index fa7428b..e42b6b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+anastasis (0.0.0-2) unstable; urgency=low
+
+  * Improved reducer structure to address UX issues.
+  * Added ability to name secrets.
+  * Modified API to allow applications to more easily control expiration.
+
+ -- Christian Grothoff <grothoff@gnu.org>  Wed, 14 Jul 2021 00:00:00 +0000
+
 anastasis (0.0.0-1) unstable; urgency=low
 
   * Various fixes in packaging and code logic.
diff --git a/src/stasis/plugin_anastasis_postgres.c 
b/src/stasis/plugin_anastasis_postgres.c
index d18456a..7c82e2c 100644
--- a/src/stasis/plugin_anastasis_postgres.c
+++ b/src/stasis/plugin_anastasis_postgres.c
@@ -548,8 +548,8 @@ postgres_increment_lifetime (
       };
       struct GNUNET_TIME_Absolute expiration;
       struct GNUNET_PQ_ResultSpec rs[] = {
-        GNUNET_PQ_result_spec_auto_from_type ("expiration_date",
-                                              &expiration),
+        GNUNET_PQ_result_spec_absolute_time ("expiration_date",
+                                             &expiration),
         GNUNET_PQ_result_spec_end
       };
 
@@ -673,8 +673,8 @@ postgres_record_recdoc_payment (
       GNUNET_PQ_query_param_end
     };
     struct GNUNET_PQ_ResultSpec rs[] = {
-      GNUNET_PQ_result_spec_auto_from_type ("expiration_date",
-                                            &expiration),
+      GNUNET_PQ_result_spec_absolute_time ("expiration_date",
+                                           &expiration),
       GNUNET_PQ_result_spec_end
     };
 
@@ -876,22 +876,26 @@ postgres_check_challenge_payment (
   bool *paid)
 {
   struct PostgresClosure *pg = cls;
+  uint8_t paid8;
   struct GNUNET_PQ_QueryParam params[] = {
     GNUNET_PQ_query_param_auto_from_type (payment_secret),
     GNUNET_PQ_query_param_auto_from_type (truth_uuid),
     GNUNET_PQ_query_param_end
   };
+  enum GNUNET_DB_QueryStatus qs;
   struct GNUNET_PQ_ResultSpec rs[] = {
     GNUNET_PQ_result_spec_auto_from_type ("paid",
-                                          paid),
+                                          &paid8),
     GNUNET_PQ_result_spec_end
   };
 
   check_connection (pg);
-  return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
-                                                   "challenge_payment_select",
-                                                   params,
-                                                   rs);
+  qs = GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
+                                                 "challenge_payment_select",
+                                                 params,
+                                                 rs);
+  *paid = (0 != paid8);
+  return qs;
 }
 
 
@@ -914,13 +918,14 @@ postgres_check_payment_identifier (
 {
   struct PostgresClosure *pg = cls;
   uint32_t counter;
+  uint8_t paid8;
   struct GNUNET_PQ_QueryParam params[] = {
     GNUNET_PQ_query_param_auto_from_type (payment_secret),
     GNUNET_PQ_query_param_end
   };
   struct GNUNET_PQ_ResultSpec rs[] = {
     GNUNET_PQ_result_spec_auto_from_type ("paid",
-                                          paid),
+                                          &paid8),
     GNUNET_PQ_result_spec_uint32 ("post_counter",
                                   &counter),
     GNUNET_PQ_result_spec_end
@@ -939,6 +944,7 @@ postgres_check_payment_identifier (
       *valid_counter = true;
     else
       *valid_counter = false;
+    *paid = (0 != paid8);
   }
   return qs;
 }
@@ -1100,8 +1106,8 @@ postgres_lookup_account (
   postgres_preflight (pg);
   {
     struct GNUNET_PQ_ResultSpec rs[] = {
-      GNUNET_PQ_result_spec_auto_from_type ("expiration_date",
-                                            &paid_until),
+      GNUNET_PQ_result_spec_absolute_time ("expiration_date",
+                                           paid_until),
       GNUNET_PQ_result_spec_auto_from_type ("recovery_data_hash",
                                             recovery_data_hash),
       GNUNET_PQ_result_spec_uint32 ("version",
@@ -1130,8 +1136,8 @@ postgres_lookup_account (
   /* check if account exists */
   {
     struct GNUNET_PQ_ResultSpec rs[] = {
-      GNUNET_PQ_result_spec_auto_from_type ("expiration_date",
-                                            &paid_until),
+      GNUNET_PQ_result_spec_absolute_time ("expiration_date",
+                                           paid_until),
       GNUNET_PQ_result_spec_end
     };
 

-- 
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]