gnunet-svn
[Top][All Lists]
Advanced

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

[taler-sync] branch master updated: make code compile without warnings a


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

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

grothoff pushed a commit to branch master
in repository sync.

The following commit(s) were added to refs/heads/master by this push:
     new 74d8a18  make code compile without warnings against latest 
libmicrohttpd API
74d8a18 is described below

commit 74d8a182f42a23ab22c53d5148413c246b76b8dd
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Apr 9 01:18:58 2020 +0200

    make code compile without warnings against latest libmicrohttpd API
---
 src/sync/sync-httpd.c             |  4 ++--
 src/sync/sync-httpd.h             | 13 +++++++------
 src/sync/sync-httpd_backup.c      |  8 ++++----
 src/sync/sync-httpd_backup.h      |  6 +++---
 src/sync/sync-httpd_backup_post.c | 16 ++++++++--------
 src/sync/sync-httpd_mhd.c         |  4 ++--
 src/sync/sync-httpd_mhd.h         |  4 ++--
 src/sync/sync-httpd_terms.c       |  2 +-
 src/sync/sync-httpd_terms.h       |  2 +-
 9 files changed, 30 insertions(+), 29 deletions(-)

diff --git a/src/sync/sync-httpd.c b/src/sync/sync-httpd.c
index 67bf75f..91ba499 100644
--- a/src/sync/sync-httpd.c
+++ b/src/sync/sync-httpd.c
@@ -129,7 +129,7 @@ struct SYNC_DatabasePlugin *db;
  *         #MHD_NO if the socket must be closed due to a serious
  *         error while handling the request
  */
-static int
+static MHD_RESULT
 url_handler (void *cls,
              struct MHD_Connection *connection,
              const char *url,
@@ -269,7 +269,7 @@ url_handler (void *cls,
            (0 == strcasecmp (method,
                              rh->method)) )
       {
-        int ret;
+        MHD_RESULT ret;
 
         ret = rh->handler (rh,
                            connection,
diff --git a/src/sync/sync-httpd.h b/src/sync/sync-httpd.h
index 989cd93..c129c7e 100644
--- a/src/sync/sync-httpd.h
+++ b/src/sync/sync-httpd.h
@@ -25,6 +25,7 @@
 #include <microhttpd.h>
 #include <taler/taler_mhd_lib.h>
 #include "sync_database_lib.h"
+#include <gnunet/gnunet_mhd_compat.h>
 
 /**
  * @brief Struct describing an URL and the handler for it.
@@ -68,16 +69,16 @@ struct SH_RequestHandler
    * @param[in,out] upload_data_size number of bytes (left) in @a upload_data
    * @return MHD result code
    */
-  int (*handler)(struct SH_RequestHandler *rh,
-                 struct MHD_Connection *connection,
-                 void **connection_cls,
-                 const char *upload_data,
-                 size_t *upload_data_size);
+  MHD_RESULT (*handler)(struct SH_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/sync/sync-httpd_backup.c b/src/sync/sync-httpd_backup.c
index b97f90f..73f7b7c 100644
--- a/src/sync/sync-httpd_backup.c
+++ b/src/sync/sync-httpd_backup.c
@@ -32,13 +32,13 @@
  * @param account public key of the account the request is for
  * @return MHD result code
  */
-int
+MHD_RESULT
 SH_backup_get (struct MHD_Connection *connection,
                const struct SYNC_AccountPublicKeyP *account)
 {
   struct GNUNET_HashCode backup_hash;
   enum SYNC_DB_QueryStatus qs;
-  int ret;
+  MHD_RESULT ret;
 
   qs = db->lookup_account_TR (db->cls,
                               account,
@@ -147,14 +147,14 @@ SH_backup_get (struct MHD_Connection *connection,
  *  with on success (#MHD_HTTP_OK or #MHD_HTTP_CONFLICT)
  * @return MHD result code
  */
-int
+MHD_RESULT
 SH_return_backup (struct MHD_Connection *connection,
                   const struct SYNC_AccountPublicKeyP *account,
                   unsigned int default_http_status)
 {
   enum SYNC_DB_QueryStatus qs;
   struct MHD_Response *resp;
-  int ret;
+  MHD_RESULT ret;
   struct SYNC_AccountSignatureP account_sig;
   struct GNUNET_HashCode backup_hash;
   struct GNUNET_HashCode prev_hash;
diff --git a/src/sync/sync-httpd_backup.h b/src/sync/sync-httpd_backup.h
index f90c3c5..ebfbe5f 100644
--- a/src/sync/sync-httpd_backup.h
+++ b/src/sync/sync-httpd_backup.h
@@ -39,7 +39,7 @@ SH_resume_all_bc (void);
  *  with on success (#MHD_HTTP_OK or #MHD_HTTP_CONFLICT)
  * @return MHD result code
  */
-int
+MHD_RESULT
 SH_return_backup (struct MHD_Connection *connection,
                   const struct SYNC_AccountPublicKeyP *account,
                   unsigned int default_http_status);
@@ -53,7 +53,7 @@ SH_return_backup (struct MHD_Connection *connection,
  * @param account public key of the account the request is for
  * @return MHD result code
  */
-int
+MHD_RESULT
 SH_backup_get (struct MHD_Connection *connection,
                const struct SYNC_AccountPublicKeyP *account);
 
@@ -66,7 +66,7 @@ SH_backup_get (struct MHD_Connection *connection,
  * @param[in,out] upload_data_size number of bytes (left) in @a upload_data
  * @return MHD result code
  */
-int
+MHD_RESULT
 SH_backup_post (struct MHD_Connection *connection,
                 void **con_cls,
                 const struct SYNC_AccountPublicKeyP *account,
diff --git a/src/sync/sync-httpd_backup_post.c 
b/src/sync/sync-httpd_backup_post.c
index c8a421d..0b189a1 100644
--- a/src/sync/sync-httpd_backup_post.c
+++ b/src/sync/sync-httpd_backup_post.c
@@ -457,7 +457,7 @@ await_payment (struct BackupContext *bc,
  *                #GNUNET_NO if payment is needed
  * @return MHD status code
  */
-static int
+static MHD_RESULT
 begin_payment (struct BackupContext *bc,
                int pay_req)
 {
@@ -471,7 +471,7 @@ begin_payment (struct BackupContext *bc,
   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 existing orders in sync 
database");
@@ -523,7 +523,7 @@ begin_payment (struct BackupContext *bc,
  * @param qs query status to handle
  * @return #MHD_YES or #MHD_NO
  */
-static int
+static MHD_RESULT
 handle_database_error (struct BackupContext *bc,
                        enum SYNC_DB_QueryStatus qs)
 {
@@ -594,7 +594,7 @@ handle_database_error (struct BackupContext *bc,
  * @param[in,out] upload_data_size number of bytes (left) in @a upload_data
  * @return MHD result code
  */
-int
+MHD_RESULT
 SH_backup_post (struct MHD_Connection *connection,
                 void **con_cls,
                 const struct SYNC_AccountPublicKeyP *account,
@@ -758,7 +758,7 @@ SH_backup_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,
@@ -827,7 +827,7 @@ SH_backup_post (struct MHD_Connection *connection,
   }
   if (NULL != bc->resp)
   {
-    int ret;
+    MHD_RESULT ret;
 
     /* We generated a response asynchronously, queue that */
     GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -896,7 +896,7 @@ SH_backup_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,
@@ -914,7 +914,7 @@ SH_backup_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,
diff --git a/src/sync/sync-httpd_mhd.c b/src/sync/sync-httpd_mhd.c
index f7449a5..fa2344b 100644
--- a/src/sync/sync-httpd_mhd.c
+++ b/src/sync/sync-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
 SH_MHD_handler_static_response (struct SH_RequestHandler *rh,
                                 struct MHD_Connection *connection,
                                 void **connection_cls,
@@ -69,7 +69,7 @@ SH_MHD_handler_static_response (struct SH_RequestHandler *rh,
  * @param[in,out] upload_data_size number of bytes (left) in @a upload_data
  * @return MHD result code
  */
-int
+MHD_RESULT
 SH_MHD_handler_agpl_redirect (struct SH_RequestHandler *rh,
                               struct MHD_Connection *connection,
                               void **connection_cls,
diff --git a/src/sync/sync-httpd_mhd.h b/src/sync/sync-httpd_mhd.h
index 40efd2e..5a7a9b2 100644
--- a/src/sync/sync-httpd_mhd.h
+++ b/src/sync/sync-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
 SH_MHD_handler_static_response (struct SH_RequestHandler *rh,
                                 struct MHD_Connection *connection,
                                 void **connection_cls,
@@ -60,7 +60,7 @@ SH_MHD_handler_static_response (struct SH_RequestHandler *rh,
  * @param mi merchant backend instance, never NULL
  * @return MHD result code
  */
-int
+MHD_RESULT
 SH_MHD_handler_agpl_redirect (struct SH_RequestHandler *rh,
                               struct MHD_Connection *connection,
                               void **connection_cls,
diff --git a/src/sync/sync-httpd_terms.c b/src/sync/sync-httpd_terms.c
index 2528ff0..c2d32aa 100644
--- a/src/sync/sync-httpd_terms.c
+++ b/src/sync/sync-httpd_terms.c
@@ -33,7 +33,7 @@
  * @param mi merchant backend instance, never NULL
  * @return MHD result code
  */
-int
+MHD_RESULT
 SH_handler_terms (struct SH_RequestHandler *rh,
                   struct MHD_Connection *connection,
                   void **connection_cls,
diff --git a/src/sync/sync-httpd_terms.h b/src/sync/sync-httpd_terms.h
index d6c538e..5f9f23a 100644
--- a/src/sync/sync-httpd_terms.h
+++ b/src/sync/sync-httpd_terms.h
@@ -33,7 +33,7 @@
  * @param[in,out] upload_data_size number of bytes (left) in @a upload_data
  * @return MHD result code
  */
-int
+MHD_RESULT
 SH_handler_terms (struct SH_RequestHandler *rh,
                   struct MHD_Connection *connection,
                   void **connection_cls,

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



reply via email to

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