gnunet-svn
[Top][All Lists]
Advanced

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

[libmicrohttpd] 18/20: test_digestauth_concurrent: added debug print


From: gnunet
Subject: [libmicrohttpd] 18/20: test_digestauth_concurrent: added debug print
Date: Mon, 15 Aug 2022 20:38:44 +0200

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

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit e1d6b7635b9c5a37fb3be5e5748278db64ec1b8b
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Aug 15 21:12:06 2022 +0300

    test_digestauth_concurrent: added debug print
---
 src/testcurl/test_digestauth_concurrent.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/testcurl/test_digestauth_concurrent.c 
b/src/testcurl/test_digestauth_concurrent.c
index 6d4e591c..efda16b6 100644
--- a/src/testcurl/test_digestauth_concurrent.c
+++ b/src/testcurl/test_digestauth_concurrent.c
@@ -383,6 +383,9 @@ setupCURL (void *cbc, uint16_t port, char *errbuf)
       (CURLE_OK != curl_easy_setopt (c, CURLOPT_HTTP_VERSION,
                                      CURL_HTTP_VERSION_1_1)) ||
       (CURLE_OK != curl_easy_setopt (c, CURLOPT_FAILONERROR, 1L)) ||
+#ifdef _DEBUG
+      (CURLE_OK != curl_easy_setopt (c, CURLOPT_VERBOSE, 1L)) ||
+#endif /* _DEBUG */
 #if CURL_AT_LEAST_VERSION (7, 19, 4)
       (CURLE_OK != curl_easy_setopt (c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP)) ||
 #endif /* CURL_AT_LEAST_VERSION (7, 19, 4) */
@@ -472,7 +475,6 @@ worker_func (void *param)
   req_result = curl_easy_perform (w->c);
   if (CURLE_OK != req_result)
   {
-    fflush (stdout);
     if (0 != w->libcurl_errbuf[0])
       fprintf (stderr, "Worker %d: first request failed. "
                "libcurl error: '%s'.\n"
@@ -483,7 +485,6 @@ worker_func (void *param)
       fprintf (stderr, "Worker %d: first request failed. "
                "libcurl error: '%s'.\n",
                w->workerNumber, curl_easy_strerror (req_result));
-    fflush (stderr);
   }
   else
   {
@@ -506,13 +507,16 @@ worker_func (void *param)
       printf ("Worker %d: first request successful.\n", w->workerNumber);
     w->success++;
   }
+#ifdef _DEBUG
+  fflush (stderr);
+  fflush (stdout);
+#endif /* _DEBUG */
 
   /* Second request */
   w->cbc.pos = 0;
   req_result = curl_easy_perform (w->c);
   if (CURLE_OK != req_result)
   {
-    fflush (stdout);
     if (0 != w->libcurl_errbuf[0])
       fprintf (stderr, "Worker %d: second request failed. "
                "libcurl error: '%s'.\n"
@@ -523,7 +527,6 @@ worker_func (void *param)
       fprintf (stderr, "Worker %d: second request failed. "
                "libcurl error: '%s'.\n",
                w->workerNumber, curl_easy_strerror (req_result));
-    fflush (stderr);
   }
   else
   {
@@ -546,6 +549,10 @@ worker_func (void *param)
       printf ("Worker %d: second request successful.\n", w->workerNumber);
     w->success++;
   }
+#ifdef _DEBUG
+  fflush (stderr);
+  fflush (stdout);
+#endif /* _DEBUG */
 
   w->finished = ! 0;
   return NULL;

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