gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated: authorisation plugin


From: gnunet
Subject: [taler-anastasis] branch master updated: authorisation plugin
Date: Fri, 23 Oct 2020 18:48:40 +0200

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

ds-meister pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 8d535af  authorisation plugin
8d535af is described below

commit 8d535af26f540f106e7f360d51bf5cf544d432c8
Author: Dominik Meister <dominik.meister@hotmail.ch>
AuthorDate: Fri Oct 23 18:48:32 2020 +0200

    authorisation plugin
---
 src/backend/anastasis-httpd_truth.c               | 6 ++++--
 src/backend/anastasis_authorization_plugin_file.c | 2 ++
 src/lib/anastasis_api_challenge_run.c             | 2 +-
 src/stasis/plugin_anastasis_postgres.c            | 8 ++++----
 4 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/backend/anastasis-httpd_truth.c 
b/src/backend/anastasis-httpd_truth.c
index a98d64b..6286396 100644
--- a/src/backend/anastasis-httpd_truth.c
+++ b/src/backend/anastasis-httpd_truth.c
@@ -153,6 +153,7 @@ request_done (struct TM_HandlerContext *hc)
     gc->as = NULL;
   }
   GNUNET_free (gc);
+  gc = NULL;
   hc->ctx = NULL;
 }
 
@@ -722,7 +723,7 @@ AH_handler_truth_get (struct MHD_Connection *connection,
       return MHD_NO;
     }
 
-    qs = db->verify_challenge_code (gc,
+    qs = db->verify_challenge_code (db->cls,
                                     &truth_public_key,
                                     code);
 
@@ -792,11 +793,12 @@ AH_handler_truth_get (struct MHD_Connection *connection,
 
     // FIXME TIME where to put this?
     // FIXME retry counter where to put it?
-    qs = db->store_challenge_code (authorization->cls,
+    qs = db->store_challenge_code (db->cls,
                                    &truth_public_key,
                                    code,
                                    challenge_expiration,
                                    3);
+
     switch (qs)
     {
     case ANASTASIS_DB_STATUS_HARD_ERROR:
diff --git a/src/backend/anastasis_authorization_plugin_file.c 
b/src/backend/anastasis_authorization_plugin_file.c
index b5583c6..905deb9 100644
--- a/src/backend/anastasis_authorization_plugin_file.c
+++ b/src/backend/anastasis_authorization_plugin_file.c
@@ -168,7 +168,9 @@ static void
 file_cleanup (struct ANASTASIS_AUTHORIZATION_State *as)
 {
   GNUNET_free (as->data);
+  as->data = NULL;
   GNUNET_free (as);
+  as = NULL;
 }
 
 
diff --git a/src/lib/anastasis_api_challenge_run.c 
b/src/lib/anastasis_api_challenge_run.c
index 7d989f4..4089c4e 100644
--- a/src/lib/anastasis_api_challenge_run.c
+++ b/src/lib/anastasis_api_challenge_run.c
@@ -115,7 +115,7 @@ handle_challenge_run_finished (void *cls,
                 "Backend didn't even return from GET /truth\n");
     break;
 
-  case MHD_HTTP_OK:
+  case MHD_HTTP_NO_CONTENT:
     {
       cro->cb = NULL;
       ANASTASIS_challenge_run_cancel (cro);
diff --git a/src/stasis/plugin_anastasis_postgres.c 
b/src/stasis/plugin_anastasis_postgres.c
index e25bb84..dc9093c 100644
--- a/src/stasis/plugin_anastasis_postgres.c
+++ b/src/stasis/plugin_anastasis_postgres.c
@@ -1892,16 +1892,16 @@ postgres_store_challenge_code (void *cls,
   }
   switch (qs)
   {
-  case ANASTASIS_DB_STATUS_HARD_ERROR:
+  case GNUNET_DB_STATUS_HARD_ERROR:
     rollback (pg);
     return ANASTASIS_DB_STATUS_HARD_ERROR;
-  case ANASTASIS_DB_STATUS_SOFT_ERROR:
+  case GNUNET_DB_STATUS_SOFT_ERROR:
     rollback (pg);
     return ANASTASIS_DB_STATUS_SOFT_ERROR;
-  case ANASTASIS_DB_STATUS_NO_RESULTS:
+  case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
     rollback (pg);
     return ANASTASIS_DB_STATUS_SOFT_ERROR;
-  case ANASTASIS_DB_STATUS_SUCCESS_ONE_RESULT:
+  case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
     break;
   default:
     rollback (pg);

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