gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] branch master updated: -improve logging


From: gnunet
Subject: [taler-merchant] branch master updated: -improve logging
Date: Wed, 04 Aug 2021 19:24:40 +0200

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

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new e5deadc0 -improve logging
e5deadc0 is described below

commit e5deadc03602af49c65432d4fcbb5347f739fa1a
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Aug 4 19:24:35 2021 +0200

    -improve logging
---
 src/backend/taler-merchant-httpd.c | 29 ++++++++++++++++++++++-------
 1 file changed, 22 insertions(+), 7 deletions(-)

diff --git a/src/backend/taler-merchant-httpd.c 
b/src/backend/taler-merchant-httpd.c
index 3d63ed46..ed782f33 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -796,10 +796,28 @@ handle_mhd_completion_callback (void *cls,
   if (NULL == hc)
     return;
   GNUNET_SCHEDULER_begin_async_scope (&hc->async_scope_id);
-  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-              "Finished handling request for `%s' with MHD termination code 
%d\n",
-              hc->url,
-              (int) toe);
+  {
+#ifdef MHD_CONNECTION_INFO_HTTP_STATUS
+    const union MHD_ConnectionInfo *ci;
+    unsigned int http_status = 0;
+
+    ci = MHD_get_connection_info (connection,
+                                  MHD_CONNECTION_INFO_HTTP_STATUS);
+    if (NULL != ci)
+      http_status = ci->http_status;
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                "Request for `%s' completed with HTTP status %u (%d)\n",
+                hc->url,
+                http_status,
+                toe);
+#else
+    (void) connection;
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                "Finished handling request for `%s' with MHD termination code 
%d\n",
+                hc->url,
+                (int) toe);
+#endif
+  }
   if (NULL != hc->cc)
     hc->cc (hc->ctx);
   TALER_MHD_parse_post_cleanup_callback (hc->json_parse_context);
@@ -808,9 +826,6 @@ handle_mhd_completion_callback (void *cls,
     json_decref (hc->request_body);
   if (NULL != hc->instance)
     instance_decref (hc->instance);
-  memset (&hc->async_scope_id,
-          0,
-          sizeof (struct GNUNET_AsyncScopeId));
   GNUNET_free (hc);
   *con_cls = NULL;
 }

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