gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated: Improved vector-send handling on


From: gnunet
Subject: [libmicrohttpd] branch master updated: Improved vector-send handling on W32
Date: Wed, 23 Dec 2020 17:10:09 +0100

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

The following commit(s) were added to refs/heads/master by this push:
     new c6589426 Improved vector-send handling on W32
c6589426 is described below

commit c65894267bb1e6f26e041bf5798b1b8baac5a71f
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Dec 23 19:08:20 2020 +0300

    Improved vector-send handling on W32
    
    Fixed compiler warning, simplified code
---
 src/microhttpd/mhd_send.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 70c8983e..a4c58516 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -812,8 +812,7 @@ MHD_send_hdr_and_body_ (struct MHD_Connection *connection,
 #endif /* HAVE_SENDMSG || HAVE_WRITEV */
 #ifdef _WIN32
   WSABUF vector[2];
-  uint32_t vec_sent;
-  int err;
+  DWORD vec_sent;
 #endif /* _WIN32 */
   bool no_vec; /* Is vector-send() disallowed? */
 
@@ -970,9 +969,8 @@ MHD_send_hdr_and_body_ (struct MHD_Connection *connection,
   vector[1].buf = (char *) body;
   vector[1].len = (unsigned long) body_size;
 
-  err = WSASend (s, vector, 2, &vec_sent, 0, NULL, NULL);
-
-  if (0 == err)
+  ret = WSASend (s, vector, 2, &vec_sent, 0, NULL, NULL);
+  if (0 == ret)
     ret = (ssize_t) vec_sent;
   else
     ret = -1;
@@ -980,9 +978,7 @@ MHD_send_hdr_and_body_ (struct MHD_Connection *connection,
 
   if (0 > ret)
   {
-#ifndef _WIN32
     const int err = MHD_socket_get_error_ ();
-#endif /* _WIN32 */
 
     if (MHD_SCKT_ERR_IS_EAGAIN_ (err))
     {

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