gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] branch master updated (e53b8c0b -> 65dac757)


From: gnunet
Subject: [libmicrohttpd] branch master updated (e53b8c0b -> 65dac757)
Date: Mon, 19 Apr 2021 13:03:25 +0200

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

karlson2k pushed a change to branch master
in repository libmicrohttpd.

    from e53b8c0b connection: report socket error in MHD log
     new ff842eab testzzuf: print wrong callback parameters values
     new 65dac757 testzzuf/test_put_chunked: fixed callback

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/testzzuf/test_get.c         | 10 ++++++++++
 src/testzzuf/test_get_chunked.c | 10 ++++++++++
 src/testzzuf/test_long_header.c | 10 ++++++++++
 src/testzzuf/test_post.c        | 10 ++++++++++
 src/testzzuf/test_post_form.c   | 10 ++++++++++
 src/testzzuf/test_put.c         | 10 ++++++++++
 src/testzzuf/test_put_chunked.c | 18 +++++++++++++++++-
 src/testzzuf/test_put_large.c   | 10 ++++++++++
 8 files changed, 87 insertions(+), 1 deletion(-)

diff --git a/src/testzzuf/test_get.c b/src/testzzuf/test_get.c
index 9ef0d4f7..0ab4fcf9 100644
--- a/src/testzzuf/test_get.c
+++ b/src/testzzuf/test_get.c
@@ -75,6 +75,16 @@ ahc_echo (void *cls,
   enum MHD_Result ret;
   (void) version; (void) upload_data; (void) upload_data_size;       /* 
Unused. Silent compiler warning. */
 
+  if (NULL == url)
+    fprintf (stderr, "The \"url\" parameter is NULL.\n");
+  if (NULL == method)
+    fprintf (stderr, "The \"method\" parameter is NULL.\n");
+  if (NULL == version)
+    fprintf (stderr, "The \"version\" parameter is NULL.\n");
+  if (NULL == upload_data_size)
+    fprintf (stderr, "The \"upload_data_size\" parameter is NULL.\n");
+  if ((0 != *upload_data_size) && (NULL == upload_data))
+    fprintf (stderr, "Upload data is NULL with non-zero size.\n");
   if (0 != strcmp (me, method))
     return MHD_NO;              /* unexpected method */
   if (&ptr != *unused)
diff --git a/src/testzzuf/test_get_chunked.c b/src/testzzuf/test_get_chunked.c
index ed974828..9fdab22a 100644
--- a/src/testzzuf/test_get_chunked.c
+++ b/src/testzzuf/test_get_chunked.c
@@ -108,6 +108,16 @@ ahc_echo (void *cls,
   (void) upload_data;
   (void) upload_data_size;     /* Unused. Silent compiler warning. */
 
+  if (NULL == url)
+    fprintf (stderr, "The \"url\" parameter is NULL.\n");
+  if (NULL == method)
+    fprintf (stderr, "The \"method\" parameter is NULL.\n");
+  if (NULL == version)
+    fprintf (stderr, "The \"version\" parameter is NULL.\n");
+  if (NULL == upload_data_size)
+    fprintf (stderr, "The \"upload_data_size\" parameter is NULL.\n");
+  if ((0 != *upload_data_size) && (NULL == upload_data))
+    fprintf (stderr, "Upload data is NULL with non-zero size.\n");
   if (0 != strcmp (me, method))
     return MHD_NO;              /* unexpected method */
   if (&aptr != *ptr)
diff --git a/src/testzzuf/test_long_header.c b/src/testzzuf/test_long_header.c
index f62fe07b..ac53bad6 100644
--- a/src/testzzuf/test_long_header.c
+++ b/src/testzzuf/test_long_header.c
@@ -85,6 +85,16 @@ ahc_echo (void *cls,
   (void) version; (void) upload_data;      /* Unused. Silent compiler warning. 
*/
   (void) upload_data_size; (void) unused;  /* Unused. Silent compiler warning. 
*/
 
+  if (NULL == url)
+    fprintf (stderr, "The \"url\" parameter is NULL.\n");
+  if (NULL == method)
+    fprintf (stderr, "The \"method\" parameter is NULL.\n");
+  if (NULL == version)
+    fprintf (stderr, "The \"version\" parameter is NULL.\n");
+  if (NULL == upload_data_size)
+    fprintf (stderr, "The \"upload_data_size\" parameter is NULL.\n");
+  if ((0 != *upload_data_size) && (NULL == upload_data))
+    fprintf (stderr, "Upload data is NULL with non-zero size.\n");
   if (0 != strcmp (me, method))
     return MHD_NO;              /* unexpected method */
   response = MHD_create_response_from_buffer (strlen (url),
diff --git a/src/testzzuf/test_post.c b/src/testzzuf/test_post.c
index e3d8512c..8377af06 100644
--- a/src/testzzuf/test_post.c
+++ b/src/testzzuf/test_post.c
@@ -122,6 +122,16 @@ ahc_echo (void *cls,
   enum MHD_Result ret;
   (void) cls; (void) version;      /* Unused. Silent compiler warning. */
 
+  if (NULL == url)
+    fprintf (stderr, "The \"url\" parameter is NULL.\n");
+  if (NULL == method)
+    fprintf (stderr, "The \"method\" parameter is NULL.\n");
+  if (NULL == version)
+    fprintf (stderr, "The \"version\" parameter is NULL.\n");
+  if (NULL == upload_data_size)
+    fprintf (stderr, "The \"upload_data_size\" parameter is NULL.\n");
+  if ((0 != *upload_data_size) && (NULL == upload_data))
+    fprintf (stderr, "Upload data is NULL with non-zero size.\n");
   if (0 != strcmp ("POST", method))
   {
     return MHD_NO;              /* unexpected method */
diff --git a/src/testzzuf/test_post_form.c b/src/testzzuf/test_post_form.c
index f994ab24..85a5d3d7 100644
--- a/src/testzzuf/test_post_form.c
+++ b/src/testzzuf/test_post_form.c
@@ -125,6 +125,16 @@ ahc_echo (void *cls,
   enum MHD_Result ret;
   (void) cls; (void) version;      /* Unused. Silent compiler warning. */
 
+  if (NULL == url)
+    fprintf (stderr, "The \"url\" parameter is NULL.\n");
+  if (NULL == method)
+    fprintf (stderr, "The \"method\" parameter is NULL.\n");
+  if (NULL == version)
+    fprintf (stderr, "The \"version\" parameter is NULL.\n");
+  if (NULL == upload_data_size)
+    fprintf (stderr, "The \"upload_data_size\" parameter is NULL.\n");
+  if ((0 != *upload_data_size) && (NULL == upload_data))
+    fprintf (stderr, "Upload data is NULL with non-zero size.\n");
   if (0 != strcmp ("POST", method))
   {
     return MHD_NO;              /* unexpected method */
diff --git a/src/testzzuf/test_put.c b/src/testzzuf/test_put.c
index 4658d0d4..86f7b63a 100644
--- a/src/testzzuf/test_put.c
+++ b/src/testzzuf/test_put.c
@@ -90,6 +90,16 @@ ahc_echo (void *cls,
   enum MHD_Result ret;
   (void) version; (void) unused;   /* Unused. Silent compiler warning. */
 
+  if (NULL == url)
+    fprintf (stderr, "The \"url\" parameter is NULL.\n");
+  if (NULL == method)
+    fprintf (stderr, "The \"method\" parameter is NULL.\n");
+  if (NULL == version)
+    fprintf (stderr, "The \"version\" parameter is NULL.\n");
+  if (NULL == upload_data_size)
+    fprintf (stderr, "The \"upload_data_size\" parameter is NULL.\n");
+  if ((0 != *upload_data_size) && (NULL == upload_data))
+    fprintf (stderr, "Upload data is NULL with non-zero size.\n");
   if (0 != strcmp ("PUT", method))
     return MHD_NO;              /* unexpected method */
   if ((*done) == 0)
diff --git a/src/testzzuf/test_put_chunked.c b/src/testzzuf/test_put_chunked.c
index 35196843..3a54b78e 100644
--- a/src/testzzuf/test_put_chunked.c
+++ b/src/testzzuf/test_put_chunked.c
@@ -91,6 +91,16 @@ ahc_echo (void *cls,
   int have;
   (void) version; (void) unused;   /* Unused. Silent compiler warning. */
 
+  if (NULL == url)
+    fprintf (stderr, "The \"url\" parameter is NULL.\n");
+  if (NULL == method)
+    fprintf (stderr, "The \"method\" parameter is NULL.\n");
+  if (NULL == version)
+    fprintf (stderr, "The \"version\" parameter is NULL.\n");
+  if (NULL == upload_data_size)
+    fprintf (stderr, "The \"upload_data_size\" parameter is NULL.\n");
+  if ((0 != *upload_data_size) && (NULL == upload_data))
+    fprintf (stderr, "Upload data is NULL with non-zero size.\n");
   if (0 != strcmp ("PUT", method))
     return MHD_NO;              /* unexpected method */
   if ((*done) < 8)
@@ -100,7 +110,11 @@ ahc_echo (void *cls,
     {
       return MHD_NO;
     }
-    if (0 == memcmp (upload_data, &"Hello123"[*done], have))
+    if (0 == have)
+    {
+      (void) 0; /* Do nothing - no data yet */
+    }
+    else if (0 == memcmp (upload_data, &"Hello123"[*done], have))
     {
       *done += have;
       *upload_data_size = 0;
@@ -146,6 +160,7 @@ testInternalPut ()
   for (i = 0; i < LOOP_COUNT; i++)
   {
     fprintf (stderr, ".");
+    done_flag = 0;
     c = curl_easy_init ();
     curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11080/hello_world";);
     curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
@@ -274,6 +289,7 @@ testExternalPut ()
   for (i = 0; i < LOOP_COUNT; i++)
   {
     fprintf (stderr, ".");
+    done_flag = 0;
     c = curl_easy_init ();
     curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11082/hello_world";);
     curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
diff --git a/src/testzzuf/test_put_large.c b/src/testzzuf/test_put_large.c
index abda22cb..3a3d7fb0 100644
--- a/src/testzzuf/test_put_large.c
+++ b/src/testzzuf/test_put_large.c
@@ -98,6 +98,16 @@ ahc_echo (void *cls,
   enum MHD_Result ret;
   (void) version; (void) unused; /* Unused. Silent compiler warning. */
 
+  if (NULL == url)
+    fprintf (stderr, "The \"url\" parameter is NULL.\n");
+  if (NULL == method)
+    fprintf (stderr, "The \"method\" parameter is NULL.\n");
+  if (NULL == version)
+    fprintf (stderr, "The \"version\" parameter is NULL.\n");
+  if (NULL == upload_data_size)
+    fprintf (stderr, "The \"upload_data_size\" parameter is NULL.\n");
+  if ((0 != *upload_data_size) && (NULL == upload_data))
+    fprintf (stderr, "Upload data is NULL with non-zero size.\n");
   if (0 != strcmp ("PUT", method))
     return MHD_NO;              /* unexpected method */
   if ((*done) == 0)

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