gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 02/02: testzzuf/test_put_chunked: fixed callback


From: gnunet
Subject: [libmicrohttpd] 02/02: testzzuf/test_put_chunked: fixed callback
Date: Mon, 19 Apr 2021 13:03:27 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 65dac757a60174baea939a595336672c051fa678
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Apr 19 13:46:07 2021 +0300

    testzzuf/test_put_chunked: fixed callback
---
 src/testzzuf/test_put_chunked.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/testzzuf/test_put_chunked.c b/src/testzzuf/test_put_chunked.c
index c762c27b..3a54b78e 100644
--- a/src/testzzuf/test_put_chunked.c
+++ b/src/testzzuf/test_put_chunked.c
@@ -110,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;
@@ -156,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);
@@ -284,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);

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