gnunet-svn
[Top][All Lists]
Advanced

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

[taler-challenger] branch master updated: remove disabled templating log


From: gnunet
Subject: [taler-challenger] branch master updated: remove disabled templating logic from challenger
Date: Thu, 05 Sep 2024 16:09:19 +0200

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

grothoff pushed a commit to branch master
in repository challenger.

The following commit(s) were added to refs/heads/master by this push:
     new 3f892c8  remove disabled templating logic from challenger
3f892c8 is described below

commit 3f892c826b141826238559e3e0423f8a83da0ecc
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Sep 5 16:09:16 2024 +0200

    remove disabled templating logic from challenger
---
 src/challenger/challenger-httpd_authorize.c     |  7 -----
 src/challenger/challenger-httpd_challenge.c     | 36 +++----------------------
 src/challenger/challenger-httpd_solve.c         | 24 +++--------------
 src/challenger/challenger-httpd_spa.c           |  4 +++
 src/challengerdb/plugin_challengerdb_postgres.c |  8 ++++++
 5 files changed, 20 insertions(+), 59 deletions(-)

diff --git a/src/challenger/challenger-httpd_authorize.c 
b/src/challenger/challenger-httpd_authorize.c
index 7b845db..4f95125 100644
--- a/src/challenger/challenger-httpd_authorize.c
+++ b/src/challenger/challenger-httpd_authorize.c
@@ -44,13 +44,6 @@ reply_error (struct CH_HandlerContext *hc,
              enum TALER_ErrorCode ec,
              const char *hint)
 {
-  if (0 == CH_get_output_type (hc->connection))
-    return TALER_TEMPLATING_reply_error (
-      hc->connection,
-      template,
-      http_status,
-      ec,
-      hint);
   return TALER_MHD_reply_with_error (
     hc->connection,
     http_status,
diff --git a/src/challenger/challenger-httpd_challenge.c 
b/src/challenger/challenger-httpd_challenge.c
index 6897ab4..560564d 100644
--- a/src/challenger/challenger-httpd_challenge.c
+++ b/src/challenger/challenger-httpd_challenge.c
@@ -246,13 +246,6 @@ reply_error (struct ChallengeContext *bc,
 {
   struct CH_HandlerContext *hc = bc->hc;
 
-  if (0 == CH_get_output_type (hc->connection))
-    return TALER_TEMPLATING_reply_error (
-      hc->connection,
-      template,
-      http_status,
-      ec,
-      hint);
   return TALER_MHD_reply_with_error (
     hc->connection,
     http_status,
@@ -744,7 +737,6 @@ CH_handler_challenge (struct CH_HandlerContext *hc,
 
   {
     json_t *args;
-    enum GNUNET_GenericReturnValue ret;
     struct MHD_Response *resp;
     unsigned int http_status;
     MHD_RESULT res;
@@ -767,30 +759,10 @@ CH_handler_challenge (struct CH_HandlerContext *hc,
                                       CH_validation_duration)))
       );
     http_status = MHD_HTTP_OK;
-    if (0 == CH_get_output_type (hc->connection))
-    {
-      ret = TALER_TEMPLATING_build (hc->connection,
-                                    &http_status,
-                                    "enter-tan-form",
-                                    NULL,
-                                    NULL,
-                                    args,
-                                    &resp);
-      json_decref (args);
-      if (GNUNET_SYSERR == ret)
-      {
-        GNUNET_break (0);
-        return MHD_NO;
-      }
-      GNUNET_break (GNUNET_OK == ret);
-    }
-    else
-    {
-      GNUNET_break (0 ==
-                    json_object_del (args,
-                                     "nonce"));
-      resp = TALER_MHD_make_json (args);
-    }
+    GNUNET_break (0 ==
+                  json_object_del (args,
+                                   "nonce"));
+    resp = TALER_MHD_make_json (args);
     GNUNET_break (MHD_YES ==
                   MHD_add_response_header (resp,
                                            MHD_HTTP_HEADER_CACHE_CONTROL,
diff --git a/src/challenger/challenger-httpd_solve.c 
b/src/challenger/challenger-httpd_solve.c
index e4a4e98..9774829 100644
--- a/src/challenger/challenger-httpd_solve.c
+++ b/src/challenger/challenger-httpd_solve.c
@@ -128,13 +128,6 @@ reply_error (struct SolveContext *bc,
 {
   struct CH_HandlerContext *hc = bc->hc;
 
-  if (0 == CH_get_output_type (hc->connection))
-    return TALER_TEMPLATING_reply_error (
-      hc->connection,
-      template,
-      http_status,
-      ec,
-      hint);
   return TALER_MHD_reply_with_error (
     hc->connection,
     http_status,
@@ -340,17 +333,9 @@ CH_handler_solve (struct CH_HandlerContext *hc,
         GNUNET_JSON_pack_bool ("no_challenge",
                                no_challenge)
         );
-      if (0 == CH_get_output_type (hc->connection))
-        ret = TALER_TEMPLATING_reply (hc->connection,
-                                      MHD_HTTP_FORBIDDEN,
-                                      "invalid-pin",
-                                      NULL,
-                                      NULL,
-                                      details);
-      else
-        ret = TALER_MHD_reply_json (hc->connection,
-                                    details,
-                                    MHD_HTTP_FORBIDDEN);
+      ret = TALER_MHD_reply_json (hc->connection,
+                                  details,
+                                  MHD_HTTP_FORBIDDEN);
       json_decref (details);
       return ret;
     }
@@ -468,6 +453,7 @@ CH_handler_solve (struct CH_HandlerContext *hc,
     else
     {
       json_t *args;
+
       args = GNUNET_JSON_PACK (
         GNUNET_JSON_pack_string ("type",
                                  "completed"),
@@ -475,9 +461,7 @@ CH_handler_solve (struct CH_HandlerContext *hc,
                                  url)
         );
       GNUNET_free (url);
-
       response = TALER_MHD_make_json (args);
-
       http_status = MHD_HTTP_OK;
     }
 
diff --git a/src/challenger/challenger-httpd_spa.c 
b/src/challenger/challenger-httpd_spa.c
index f70ec80..ac44eb2 100644
--- a/src/challenger/challenger-httpd_spa.c
+++ b/src/challenger/challenger-httpd_spa.c
@@ -339,6 +339,10 @@ CH_spa_init ()
  * Nicely shut down.
  */
 void __attribute__ ((destructor))
+get_spa_fini (void);
+
+/* Declaration to suppress compiler warning */
+void __attribute__ ((destructor))
 get_spa_fini ()
 {
   struct WebuiFile *w;
diff --git a/src/challengerdb/plugin_challengerdb_postgres.c 
b/src/challengerdb/plugin_challengerdb_postgres.c
index ba57feb..4e9bf84 100644
--- a/src/challengerdb/plugin_challengerdb_postgres.c
+++ b/src/challengerdb/plugin_challengerdb_postgres.c
@@ -346,6 +346,10 @@ postgres_create_tables (void *cls)
  * @return NULL on error, otherwise a `struct TALER_CHALLENGERDB_Plugin`
  */
 void *
+libchallenger_plugin_db_postgres_init (void *cls);
+
+/* Declaration to suppress compiler warning */
+void *
 libchallenger_plugin_db_postgres_init (void *cls)
 {
   struct GNUNET_CONFIGURATION_Handle *cfg = cls;
@@ -422,6 +426,10 @@ libchallenger_plugin_db_postgres_init (void *cls)
  * @return NULL (always)
  */
 void *
+libchallenger_plugin_db_postgres_done (void *cls);
+
+/* Declaration to suppress compiler warning */
+void *
 libchallenger_plugin_db_postgres_done (void *cls)
 {
   struct CHALLENGER_DatabasePlugin *plugin = cls;

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