gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated: -first rough implementation of


From: gnunet
Subject: [taler-anastasis] branch master updated: -first rough implementation of meta handler
Date: Wed, 19 Jan 2022 10:40:14 +0100

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

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new fbf8701  -first rough implementation of meta handler
fbf8701 is described below

commit fbf87011b5129a44e2494758effc7bd6716d6d3b
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Jan 19 10:40:11 2022 +0100

    -first rough implementation of meta handler
---
 src/backend/Makefile.am                |  1 +
 src/backend/anastasis-httpd.c          |  1 +
 src/backend/anastasis-httpd_policy.c   |  3 +--
 src/backend/anastasis-httpd_policy.h   |  2 +-
 src/stasis/plugin_anastasis_postgres.c | 26 ++++++++++++++++++--------
 5 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/src/backend/Makefile.am b/src/backend/Makefile.am
index 1046810..0f3a969 100644
--- a/src/backend/Makefile.am
+++ b/src/backend/Makefile.am
@@ -18,6 +18,7 @@ anastasis_httpd_SOURCES = \
   anastasis-httpd.c anastasis-httpd.h \
   anastasis-httpd_mhd.c anastasis-httpd_mhd.h \
   anastasis-httpd_policy.c anastasis-httpd_policy.h \
+  anastasis-httpd_policy-meta.c anastasis-httpd_policy-meta.h \
   anastasis-httpd_policy_upload.c \
   anastasis-httpd_truth.c anastasis-httpd_truth.h \
   anastasis-httpd_terms.c anastasis-httpd_terms.h \
diff --git a/src/backend/anastasis-httpd.c b/src/backend/anastasis-httpd.c
index ba5417b..e2b363c 100644
--- a/src/backend/anastasis-httpd.c
+++ b/src/backend/anastasis-httpd.c
@@ -26,6 +26,7 @@
 #include "anastasis-httpd_mhd.h"
 #include "anastasis_database_lib.h"
 #include "anastasis-httpd_policy.h"
+#include "anastasis-httpd_policy-meta.h"
 #include "anastasis-httpd_truth.h"
 #include "anastasis-httpd_terms.h"
 #include "anastasis-httpd_config.h"
diff --git a/src/backend/anastasis-httpd_policy.c 
b/src/backend/anastasis-httpd_policy.c
index 99ed719..a26d11e 100644
--- a/src/backend/anastasis-httpd_policy.c
+++ b/src/backend/anastasis-httpd_policy.c
@@ -32,8 +32,7 @@
 
 
 /**
- * Return the current recoverydocument of @a account on @a connection
- * using @a default_http_status on success.
+ * Return the current recoverydocument of @a account on @a connection.
  *
  * @param connection MHD connection to use
  * @param account_pub account to query
diff --git a/src/backend/anastasis-httpd_policy.h 
b/src/backend/anastasis-httpd_policy.h
index 33d51cf..2735db6 100644
--- a/src/backend/anastasis-httpd_policy.h
+++ b/src/backend/anastasis-httpd_policy.h
@@ -1,6 +1,6 @@
 /*
   This file is part of Anastasis
-  Copyright (C) 2014, 2015, 2016 Anastasis SARL
+  Copyright (C) 2019-2021 Anastasis SARL
 
   Anastasis is free software; you can redistribute it and/or modify it under 
the
   terms of the GNU Affero General Public License as published by the Free 
Software
diff --git a/src/stasis/plugin_anastasis_postgres.c 
b/src/stasis/plugin_anastasis_postgres.c
index 801552d..ef13c6c 100644
--- a/src/stasis/plugin_anastasis_postgres.c
+++ b/src/stasis/plugin_anastasis_postgres.c
@@ -343,8 +343,18 @@ prepare_statements (void *cls)
                             ",encrypted_truth"
                             ",truth_mime"
                             " FROM anastasis_truth"
-                            " WHERE truth_uuid =$1;",
+                            " WHERE truth_uuid=$1;",
                             1),
+    GNUNET_PQ_make_prepare ("recoverydocument_select_meta",
+                            "SELECT "
+                            " version"
+                            ",recovery_meta_data"
+                            " FROM anastasis_recoverydocument"
+                            " WHERE user_id=$1"
+                            "   AND version < $2"
+                            " ORDER BY version DESC"
+                            " LIMIT 1000;",
+                            2),
     GNUNET_PQ_make_prepare ("latest_recoverydocument_select",
                             "SELECT "
                             " version"
@@ -352,7 +362,7 @@ prepare_statements (void *cls)
                             ",recovery_data_hash"
                             ",recovery_data"
                             " FROM anastasis_recoverydocument"
-                            " WHERE user_id =$1 "
+                            " WHERE user_id=$1"
                             " ORDER BY version DESC"
                             " LIMIT 1;",
                             1),
@@ -384,12 +394,12 @@ prepare_statements (void *cls)
                             "  AND payment_identifier=$2;",
                             2),
     GNUNET_PQ_make_prepare ("postcounter_update",
-                            "UPDATE "
-                            "anastasis_recdoc_payment "
-                            "SET "
-                            "post_counter=$1 "
-                            "WHERE user_id =$2 "
-                            "AND payment_identifier=$3;",
+                            "UPDATE"
+                            " anastasis_recdoc_payment"
+                            " SET"
+                            " post_counter=$1"
+                            " WHERE user_id =$2"
+                            "   AND payment_identifier=$3;",
                             3),
     GNUNET_PQ_make_prepare ("key_share_select",
                             "SELECT "

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