[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-challenger] branch master updated: improve logging
From: |
gnunet |
Subject: |
[taler-challenger] branch master updated: improve logging |
Date: |
Wed, 14 Feb 2024 10:50:23 +0100 |
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 35caab4 improve logging
35caab4 is described below
commit 35caab4eec4cd11816acc9a49defe3df3c475c91
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Feb 14 10:50:20 2024 +0100
improve logging
---
src/challenger/challenger-httpd.c | 10 +++++++---
src/challenger/challenger-httpd.h | 1 +
src/challenger/challenger-httpd_authorize.c | 1 +
src/challenger/challenger-httpd_challenge.c | 1 +
src/challenger/challenger-httpd_setup.c | 10 ++++++++++
5 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/src/challenger/challenger-httpd.c
b/src/challenger/challenger-httpd.c
index 8c7a45d..89154eb 100644
--- a/src/challenger/challenger-httpd.c
+++ b/src/challenger/challenger-httpd.c
@@ -1,6 +1,6 @@
/*
This file is part of Challenger
- (C) 2023 Taler Systems SA
+ (C) 2023, 2024 Taler Systems SA
Challenger 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
@@ -377,14 +377,18 @@ handle_mhd_completion_callback (void *cls,
enum MHD_RequestTerminationCode toe)
{
struct CH_HandlerContext *hc = *con_cls;
+ const union MHD_ConnectionInfo *ci;
(void) cls;
if (NULL == hc)
return;
GNUNET_assert (hc->connection == connection);
+ ci = MHD_get_connection_info (connection,
+ MHD_CONNECTION_INFO_HTTP_STATUS);
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Finished handling request with status %d\n",
- (int) toe);
+ "Finished handling request with status %d (HTTP status %u)\n",
+ (int) toe,
+ ci->http_status);
if (NULL != hc->cc)
hc->cc (hc->ctx);
GNUNET_free (hc);
diff --git a/src/challenger/challenger-httpd.h
b/src/challenger/challenger-httpd.h
index fa05315..70d9138 100644
--- a/src/challenger/challenger-httpd.h
+++ b/src/challenger/challenger-httpd.h
@@ -83,6 +83,7 @@ struct CH_HandlerContext
* Asynchronous request context id.
*/
struct GNUNET_AsyncScopeId async_scope_id;
+
};
diff --git a/src/challenger/challenger-httpd_authorize.c
b/src/challenger/challenger-httpd_authorize.c
index 422a3f8..c74e7df 100644
--- a/src/challenger/challenger-httpd_authorize.c
+++ b/src/challenger/challenger-httpd_authorize.c
@@ -162,6 +162,7 @@ CH_handler_authorize (struct CH_HandlerContext *hc,
GNUNET_break (0);
return MHD_NO;
case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
+ GNUNET_break_op (0);
return TALER_TEMPLATING_reply_error (hc->connection,
"validation-unknown",
MHD_HTTP_NOT_FOUND,
diff --git a/src/challenger/challenger-httpd_challenge.c
b/src/challenger/challenger-httpd_challenge.c
index d17d0cc..6a66d35 100644
--- a/src/challenger/challenger-httpd_challenge.c
+++ b/src/challenger/challenger-httpd_challenge.c
@@ -539,6 +539,7 @@ CH_handler_challenge (struct CH_HandlerContext *hc,
GNUNET_break (0);
return MHD_NO;
case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
+ GNUNET_break_op (0);
return TALER_TEMPLATING_reply_error (hc->connection,
"validation-unknown",
MHD_HTTP_NOT_FOUND,
diff --git a/src/challenger/challenger-httpd_setup.c
b/src/challenger/challenger-httpd_setup.c
index 1665e60..34e3a2f 100644
--- a/src/challenger/challenger-httpd_setup.c
+++ b/src/challenger/challenger-httpd_setup.c
@@ -120,6 +120,16 @@ CH_handler_setup (struct CH_HandlerContext *hc,
case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
break;
}
+ {
+ char *nstr;
+
+ nstr = GNUNET_STRINGS_data_to_string_alloc (&nonce,
+ sizeof (nonce));
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "/setup returns nonce `%s'\n",
+ nstr);
+ GNUNET_free (nstr);
+ }
return TALER_MHD_REPLY_JSON_PACK (
hc->connection,
MHD_HTTP_OK,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-challenger] branch master updated: improve logging,
gnunet <=