gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated: make code compile without warni


From: gnunet
Subject: [taler-anastasis] branch master updated: make code compile without warnings against latest libmicrohttpd API
Date: Thu, 09 Apr 2020 01:21:45 +0200

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 d79dfb1  make code compile without warnings against latest 
libmicrohttpd API
d79dfb1 is described below

commit d79dfb14c8993a4cd637a41a0b75409c7a8c85e8
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Apr 9 01:21:43 2020 +0200

    make code compile without warnings against latest libmicrohttpd API
---
 src/backend/anastasis-httpd.c               |  6 +++---
 src/backend/anastasis-httpd.h               | 14 ++++++++------
 src/backend/anastasis-httpd_mhd.c           |  4 ++--
 src/backend/anastasis-httpd_mhd.h           |  4 ++--
 src/backend/anastasis-httpd_policy.c        | 11 +++++------
 src/backend/anastasis-httpd_policy.h        |  8 ++++----
 src/backend/anastasis-httpd_policy_upload.c | 16 ++++++++--------
 7 files changed, 32 insertions(+), 31 deletions(-)

diff --git a/src/backend/anastasis-httpd.c b/src/backend/anastasis-httpd.c
index afdaf9a..631846e 100644
--- a/src/backend/anastasis-httpd.c
+++ b/src/backend/anastasis-httpd.c
@@ -196,7 +196,7 @@ AH_trigger_curl ()
  *         #MHD_NO if the socket must be closed due to a serios
  *         error while handling the request
  */
-static int
+static MHD_RESULT
 url_handler (void *cls,
              struct MHD_Connection *connection,
              const char *url,
@@ -274,7 +274,7 @@ url_handler (void *cls,
     if (0 == strcmp (method,
                      MHD_HTTP_METHOD_POST))
     {
-      int ret;
+      MHD_RESULT ret;
       ret = AH_handler_policy_post (connection,
                                     con_cls,
                                     url,
@@ -328,7 +328,7 @@ url_handler (void *cls,
            (0 == strcasecmp (method,
                              rh->method)) )
       {
-        int ret;
+        MHD_RESULT ret;
 
         ret = rh->handler (rh,
                            connection,
diff --git a/src/backend/anastasis-httpd.h b/src/backend/anastasis-httpd.h
index f08edbd..3d5998a 100644
--- a/src/backend/anastasis-httpd.h
+++ b/src/backend/anastasis-httpd.h
@@ -25,6 +25,8 @@
 #include <microhttpd.h>
 #include <taler/taler_mhd_lib.h>
 #include "anastasis_database_lib.h"
+#include <gnunet/gnunet_mhd_compat.h>
+
 
 /**
  * @brief Struct describing an URL and the handler for it.
@@ -69,16 +71,16 @@ struct TMH_RequestHandler
    * @param[in,out] upload_data_size number of bytes (left) in @a upload_data
    * @return MHD result code
    */
-  int (*handler)(struct TMH_RequestHandler *rh,
-                 struct MHD_Connection *connection,
-                 void **connection_cls,
-                 const char *upload_data,
-                 size_t *upload_data_size);
+  MHD_RESULT (*handler)(struct TMH_RequestHandler *rh,
+                        struct MHD_Connection *connection,
+                        void **connection_cls,
+                        const char *upload_data,
+                        size_t *upload_data_size);
 
   /**
    * Default response code.
    */
-  int response_code;
+  unsigned int response_code;
 };
 
 
diff --git a/src/backend/anastasis-httpd_mhd.c 
b/src/backend/anastasis-httpd_mhd.c
index 2faf58b..0913b5e 100644
--- a/src/backend/anastasis-httpd_mhd.c
+++ b/src/backend/anastasis-httpd_mhd.c
@@ -38,7 +38,7 @@
  * @param[in,out] upload_data_size number of bytes (left) in @a upload_data
  * @return MHD result code
  */
-int
+MHD_RESULT
 TMH_MHD_handler_static_response (struct TMH_RequestHandler *rh,
                                  struct MHD_Connection *connection,
                                  void **connection_cls,
@@ -69,7 +69,7 @@ TMH_MHD_handler_static_response (struct TMH_RequestHandler 
*rh,
  * @param[in,out] upload_data_size number of bytes (left) in @a upload_data
  * @return MHD result code
  */
-int
+MHD_RESULT
 TMH_MHD_handler_agpl_redirect (struct TMH_RequestHandler *rh,
                                struct MHD_Connection *connection,
                                void **connection_cls,
diff --git a/src/backend/anastasis-httpd_mhd.h 
b/src/backend/anastasis-httpd_mhd.h
index ae6e26a..61986cf 100644
--- a/src/backend/anastasis-httpd_mhd.h
+++ b/src/backend/anastasis-httpd_mhd.h
@@ -40,7 +40,7 @@
  * @param mi merchant backend instance, NULL is allowed in this case!
  * @return MHD result code
  */
-int
+MHD_RESULT
 TMH_MHD_handler_static_response (struct TMH_RequestHandler *rh,
                                  struct MHD_Connection *connection,
                                  void **connection_cls,
@@ -60,7 +60,7 @@ TMH_MHD_handler_static_response (struct TMH_RequestHandler 
*rh,
  * @param mi merchant backend instance, never NULL
  * @return MHD result code
  */
-int
+MHD_RESULT
 TMH_MHD_handler_agpl_redirect (struct TMH_RequestHandler *rh,
                                struct MHD_Connection *connection,
                                void **connection_cls,
diff --git a/src/backend/anastasis-httpd_policy.c 
b/src/backend/anastasis-httpd_policy.c
index 23d41a0..ff6ddd6 100644
--- a/src/backend/anastasis-httpd_policy.c
+++ b/src/backend/anastasis-httpd_policy.c
@@ -48,14 +48,14 @@
  *  with on success (#MHD_HTTP_OK or #MHD_HTTP_CONFLICT)
  * @return MHD result code
  */
-int
+MHD_RESULT
 AH_return_policy (struct MHD_Connection *connection,
                   const struct ANASTASIS_CRYPTO_AccountPublicKey *account_pub,
                   unsigned int default_http_status)
 {
   enum ANASTASIS_DB_QueryStatus qs;
   struct MHD_Response *resp;
-  int ret;
+  MHD_RESULT ret;
   struct ANASTASIS_AccountSignatureP account_sig;
   struct GNUNET_HashCode recovery_data_hash;
   struct GNUNET_HashCode prev_hash;
@@ -163,8 +163,7 @@ AH_return_policy (struct MHD_Connection *connection,
                   MHD_add_response_header (resp,
                                            "Anastasis-Previous",
                                            prev_s));
-    */
-    GNUNET_break (MHD_YES ==
+    */GNUNET_break (MHD_YES ==
                   MHD_add_response_header (resp,
                                            MHD_HTTP_HEADER_ETAG,
                                            etag));
@@ -186,13 +185,13 @@ AH_return_policy (struct MHD_Connection *connection,
  * @param con_cls
  * @return MHD result code
  */
-int
+MHD_RESULT
 AH_policy_get (struct MHD_Connection *connection,
                const char *url)
 {
   struct GNUNET_HashCode recovery_data_hash;
   enum ANASTASIS_DB_QueryStatus qs;
-  int ret;
+  MHD_RESULT ret;
   struct ANASTASIS_CRYPTO_AccountPublicKey account_pub;
 
   GNUNET_assert (0 == strncmp (url,
diff --git a/src/backend/anastasis-httpd_policy.h 
b/src/backend/anastasis-httpd_policy.h
index f4e4171..0eb9566 100644
--- a/src/backend/anastasis-httpd_policy.h
+++ b/src/backend/anastasis-httpd_policy.h
@@ -37,7 +37,7 @@ AH_resume_all_bc (void);
  * @param url handles a URL of the format 
"/policy/$ACCOUNT_PUB[&version=$NUMBER]"
  * @return MHD result code
  */
-int
+MHD_RESULT
 AH_policy_get (struct MHD_Connection *connection,
                const char *url);
 
@@ -49,7 +49,7 @@ AH_policy_get (struct MHD_Connection *connection,
  * @param upload_data_size number of bytes (left) in @a upload_data
  * @return MHD result code
  */
-int
+MHD_RESULT
 AH_handler_policy_post (struct MHD_Connection *connection,
                         void **con_cls,
                         const char *url,
@@ -66,10 +66,10 @@ AH_handler_policy_post (struct MHD_Connection *connection,
  *  with on success (#MHD_HTTP_OK or #MHD_HTTP_CONFLICT)
  * @return MHD result code
  */
-int
+MHD_RESULT
 AH_return_policy (struct MHD_Connection *connection,
                   const struct ANASTASIS_CRYPTO_AccountPublicKey *account,
                   unsigned int default_http_status);
 
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/backend/anastasis-httpd_policy_upload.c 
b/src/backend/anastasis-httpd_policy_upload.c
index 9b28af0..3dd049c 100644
--- a/src/backend/anastasis-httpd_policy_upload.c
+++ b/src/backend/anastasis-httpd_policy_upload.c
@@ -487,7 +487,7 @@ await_payment (struct PolicyUploadContext *puc,
  *                #GNUNET_NO if payment is needed
  * @return MHD status code
  */
-static int
+static MHD_RESULT
 begin_payment (struct PolicyUploadContext *puc,
                int pay_req)
 {
@@ -502,7 +502,7 @@ begin_payment (struct PolicyUploadContext *puc,
   if (qs < 0)
   {
     struct MHD_Response *resp;
-    int ret;
+    MHD_RESULT ret;
 
     resp = TALER_MHD_make_error (TALER_EC_SYNC_PAYMENT_CHECK_ORDER_DB_ERROR,
                                  "Failed to check for expired payment in 
anastasis database");
@@ -563,7 +563,7 @@ begin_payment (struct PolicyUploadContext *puc,
  * @param qs query status to handle
  * @return #MHD_YES or #MHD_NO
  */
-static int
+static MHD_RESULT
 handle_database_error (struct PolicyUploadContext *puc,
                        enum ANASTASIS_DB_QueryStatus qs)
 {
@@ -640,7 +640,7 @@ handle_database_error (struct PolicyUploadContext *puc,
  * @param recovery_data_size number of bytes (left) in @a recovery_data
  * @return MHD result code
  */
-int
+MHD_RESULT
 AH_handler_policy_post (struct MHD_Connection *connection,
                         void **con_cls,
                         const char *url,
@@ -831,7 +831,7 @@ AH_handler_policy_post (struct MHD_Connection *connection,
       {
         /* Refuse upload: we already have that backup! */
         struct MHD_Response *resp;
-        int ret;
+        MHD_RESULT ret;
 
         resp = MHD_create_response_from_buffer (0,
                                                 NULL,
@@ -931,7 +931,7 @@ AH_handler_policy_post (struct MHD_Connection *connection,
   }
   if (NULL != puc->resp)
   {
-    int ret;
+    MHD_RESULT ret;
 
     /* We generated a response asynchronously, queue that */
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -995,7 +995,7 @@ AH_handler_policy_post (struct MHD_Connection *connection,
          theoretically happen if another equivalent upload succeeded
          since we last checked!) */
       struct MHD_Response *resp;
-      int ret;
+      MHD_RESULT ret;
 
       resp = MHD_create_response_from_buffer (0,
                                               NULL,
@@ -1013,7 +1013,7 @@ AH_handler_policy_post (struct MHD_Connection *connection,
   /* generate main (204) standard success reply */
   {
     struct MHD_Response *resp;
-    int ret;
+    MHD_RESULT ret;
 
     resp = MHD_create_response_from_buffer (0,
                                             NULL,

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]