gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated: postprocessor: use NULL for 'data


From: gnunet
Subject: [libmicrohttpd] branch master updated: postprocessor: use NULL for 'data' for callback if no value is present
Date: Sun, 12 Sep 2021 18:44:34 +0200

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 1e314fd5 postprocessor: use NULL for 'data' for callback if no value 
is present
1e314fd5 is described below

commit 1e314fd50a9ba0357d3a722ebcc7c125a37c06b1
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Sun Sep 12 19:21:49 2021 +0300

    postprocessor: use NULL for 'data' for callback if no value is present
---
 src/include/microhttpd.h       | 4 ++--
 src/microhttpd/postprocessor.c | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index 6cac54cf..d10ed759 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -96,7 +96,7 @@ extern "C"
  * they are parsed as decimal numbers.
  * Example: 0x01093001 = 1.9.30-1.
  */
-#define MHD_VERSION 0x00097312
+#define MHD_VERSION 0x00097313
 
 /* If generic headers don't work on your platform, include headers
    which define 'va_list', 'size_t', 'ssize_t', 'intptr_t',
@@ -2448,7 +2448,7 @@ typedef void
  * @param content_type mime-type of the data, NULL if not known
  * @param transfer_encoding encoding of the data, NULL if not known
  * @param data pointer to @a size bytes of data at the
- *              specified offset
+ *              specified offset, NULL if no value is present
  * @param off offset of data in the overall value
  * @param size number of bytes in @a data available
  * @return #MHD_YES to continue iterating,
diff --git a/src/microhttpd/postprocessor.c b/src/microhttpd/postprocessor.c
index 7c78020e..334611ae 100644
--- a/src/microhttpd/postprocessor.c
+++ b/src/microhttpd/postprocessor.c
@@ -453,7 +453,8 @@ process_value (struct MHD_PostProcessor *pp,
                               NULL,
                               NULL,
                               NULL,
-                              xbuf,
+                              ((0 != xoff) || (0 != pp->value_offset) ||
+                               (NULL != value_end)) ? xbuf : NULL,
                               pp->value_offset,
                               xoff))
       {

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