gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r35537 - in libmicrohttpd: . src/testcurl src/testzzuf


From: gnunet
Subject: [GNUnet-SVN] r35537 - in libmicrohttpd: . src/testcurl src/testzzuf
Date: Wed, 15 Apr 2015 03:19:44 +0200

Author: grothoff
Date: 2015-04-15 03:19:44 +0200 (Wed, 15 Apr 2015)
New Revision: 35537

Modified:
   libmicrohttpd/ChangeLog
   libmicrohttpd/src/testcurl/perf_get.c
   libmicrohttpd/src/testcurl/perf_get_concurrent.c
   libmicrohttpd/src/testcurl/test_concurrent_stop.c
   libmicrohttpd/src/testcurl/test_get.c
   libmicrohttpd/src/testcurl/test_get_response_cleanup.c
   libmicrohttpd/src/testcurl/test_get_sendfile.c
   libmicrohttpd/src/testcurl/test_iplimit.c
   libmicrohttpd/src/testcurl/test_large_put.c
   libmicrohttpd/src/testcurl/test_long_header.c
   libmicrohttpd/src/testcurl/test_parse_cookies.c
   libmicrohttpd/src/testcurl/test_post.c
   libmicrohttpd/src/testcurl/test_post_loop.c
   libmicrohttpd/src/testcurl/test_postform.c
   libmicrohttpd/src/testcurl/test_process_arguments.c
   libmicrohttpd/src/testcurl/test_process_headers.c
   libmicrohttpd/src/testcurl/test_put.c
   libmicrohttpd/src/testcurl/test_quiesce.c
   libmicrohttpd/src/testcurl/test_timeout.c
   libmicrohttpd/src/testcurl/test_urlparse.c
   libmicrohttpd/src/testzzuf/test_get.c
   libmicrohttpd/src/testzzuf/test_long_header.c
   libmicrohttpd/src/testzzuf/test_post.c
   libmicrohttpd/src/testzzuf/test_post_form.c
   libmicrohttpd/src/testzzuf/test_put.c
   libmicrohttpd/src/testzzuf/test_put_large.c
Log:
fix #3753

Modified: libmicrohttpd/ChangeLog
===================================================================
--- libmicrohttpd/ChangeLog     2015-04-14 22:49:27 UTC (rev 35536)
+++ libmicrohttpd/ChangeLog     2015-04-15 01:19:44 UTC (rev 35537)
@@ -1,3 +1,6 @@
+Wed Apr 15 03:16:18 CEST 2015
+       Fixing issue #3753 (testcase issue). -CG
+
 Wed Apr 15 00:30:34 CEST 2015
        Fix looping issue when using MHD_USE_POLL_INTERNALLY
        and a client times out. -LB

Modified: libmicrohttpd/src/testcurl/perf_get.c
===================================================================
--- libmicrohttpd/src/testcurl/perf_get.c       2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testcurl/perf_get.c       2015-04-15 01:19:44 UTC (rev 
35537)
@@ -502,7 +502,8 @@
   unsigned int errorCount = 0;
   int port = 1081;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   response = MHD_create_response_from_buffer (strlen ("/hello_world"),

Modified: libmicrohttpd/src/testcurl/perf_get_concurrent.c
===================================================================
--- libmicrohttpd/src/testcurl/perf_get_concurrent.c    2015-04-14 22:49:27 UTC 
(rev 35536)
+++ libmicrohttpd/src/testcurl/perf_get_concurrent.c    2015-04-15 01:19:44 UTC 
(rev 35537)
@@ -336,7 +336,8 @@
   unsigned int errorCount = 0;
   int port = 1081;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   response = MHD_create_response_from_buffer (strlen ("/hello_world"),

Modified: libmicrohttpd/src/testcurl/test_concurrent_stop.c
===================================================================
--- libmicrohttpd/src/testcurl/test_concurrent_stop.c   2015-04-14 22:49:27 UTC 
(rev 35536)
+++ libmicrohttpd/src/testcurl/test_concurrent_stop.c   2015-04-15 01:19:44 UTC 
(rev 35537)
@@ -211,7 +211,8 @@
   unsigned int errorCount = 0;
   int port = 1081;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   response = MHD_create_response_from_buffer (strlen ("/hello_world"),

Modified: libmicrohttpd/src/testcurl/test_get.c
===================================================================
--- libmicrohttpd/src/testcurl/test_get.c       2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testcurl/test_get.c       2015-04-15 01:19:44 UTC (rev 
35537)
@@ -606,7 +606,8 @@
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testInternalGet (0);

Modified: libmicrohttpd/src/testcurl/test_get_response_cleanup.c
===================================================================
--- libmicrohttpd/src/testcurl/test_get_response_cleanup.c      2015-04-14 
22:49:27 UTC (rev 35536)
+++ libmicrohttpd/src/testcurl/test_get_response_cleanup.c      2015-04-15 
01:19:44 UTC (rev 35537)
@@ -290,7 +290,8 @@
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   errorCount += testInternalGet ();
   errorCount += testMultithreadedGet ();
   errorCount += testMultithreadedPoolGet ();

Modified: libmicrohttpd/src/testcurl/test_get_sendfile.c
===================================================================
--- libmicrohttpd/src/testcurl/test_get_sendfile.c      2015-04-14 22:49:27 UTC 
(rev 35536)
+++ libmicrohttpd/src/testcurl/test_get_sendfile.c      2015-04-15 01:19:44 UTC 
(rev 35537)
@@ -482,7 +482,8 @@
     }
   fwrite (TESTSTR, strlen (TESTSTR), 1, f);
   fclose (f);
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testInternalGet ();

Modified: libmicrohttpd/src/testcurl/test_iplimit.c
===================================================================
--- libmicrohttpd/src/testcurl/test_iplimit.c   2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testcurl/test_iplimit.c   2015-04-15 01:19:44 UTC (rev 
35537)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file daemontest_get.c
+ * @file test_iplimit.c
  * @brief  Testcase for libmicrohttpd GET operations
  *         TODO: test parsing of query
  * @author Christian Grothoff
@@ -300,7 +300,8 @@
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount |= testMultithreadedGet ();

Modified: libmicrohttpd/src/testcurl/test_large_put.c
===================================================================
--- libmicrohttpd/src/testcurl/test_large_put.c 2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testcurl/test_large_put.c 2015-04-15 01:19:44 UTC (rev 
35537)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file daemontest_large_put.c
+ * @file test_large_put.c
  * @brief  Testcase for libmicrohttpd PUT operations
  * @author Christian Grothoff
  */
@@ -460,7 +460,8 @@
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   put_buffer = malloc (PUT_SIZE);

Modified: libmicrohttpd/src/testcurl/test_long_header.c
===================================================================
--- libmicrohttpd/src/testcurl/test_long_header.c       2015-04-14 22:49:27 UTC 
(rev 35536)
+++ libmicrohttpd/src/testcurl/test_long_header.c       2015-04-15 01:19:44 UTC 
(rev 35537)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file daemontest_long_header.c
+ * @file test_long_header.c
  * @brief  Testcase for libmicrohttpd handling of very long headers
  * @author Christian Grothoff
  */
@@ -240,7 +240,8 @@
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testLongUrlGet ();

Modified: libmicrohttpd/src/testcurl/test_parse_cookies.c
===================================================================
--- libmicrohttpd/src/testcurl/test_parse_cookies.c     2015-04-14 22:49:27 UTC 
(rev 35536)
+++ libmicrohttpd/src/testcurl/test_parse_cookies.c     2015-04-15 01:19:44 UTC 
(rev 35537)
@@ -20,7 +20,7 @@
 */
 
 /**
- * @file daemontest_parse_cookies.c
+ * @file test_parse_cookies.c
  * @brief  Testcase for HTTP cookie parsing
  * @author Christian Grothoff
  */
@@ -233,13 +233,13 @@
 }
 
 
-
 int
 main (int argc, char *const *argv)
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testExternalGet ();

Modified: libmicrohttpd/src/testcurl/test_post.c
===================================================================
--- libmicrohttpd/src/testcurl/test_post.c      2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testcurl/test_post.c      2015-04-15 01:19:44 UTC (rev 
35537)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file test_postx.c
+ * @file test_post.c
  * @brief  Testcase for libmicrohttpd POST operations using URL-encoding
  * @author Christian Grothoff
  */
@@ -632,12 +632,14 @@
   return result;
 }
 
+
 int
 main (int argc, char *const *argv)
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testMultithreadedPostCancel ();

Modified: libmicrohttpd/src/testcurl/test_post_loop.c
===================================================================
--- libmicrohttpd/src/testcurl/test_post_loop.c 2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testcurl/test_post_loop.c 2015-04-15 01:19:44 UTC (rev 
35537)
@@ -480,7 +480,8 @@
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   start_time = now();

Modified: libmicrohttpd/src/testcurl/test_postform.c
===================================================================
--- libmicrohttpd/src/testcurl/test_postform.c  2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testcurl/test_postform.c  2015-04-15 01:19:44 UTC (rev 
35537)
@@ -483,7 +483,8 @@
   gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
 #endif
 #endif
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testInternalPost ();

Modified: libmicrohttpd/src/testcurl/test_process_arguments.c
===================================================================
--- libmicrohttpd/src/testcurl/test_process_arguments.c 2015-04-14 22:49:27 UTC 
(rev 35536)
+++ libmicrohttpd/src/testcurl/test_process_arguments.c 2015-04-15 01:19:44 UTC 
(rev 35537)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file daemontest_process_arguments.c
+ * @file test_process_arguments.c
  * @brief  Testcase for HTTP URI arguments
  * @author Christian Grothoff
  */
@@ -232,13 +232,13 @@
 }
 
 
-
 int
 main (int argc, char *const *argv)
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testExternalGet ();

Modified: libmicrohttpd/src/testcurl/test_process_headers.c
===================================================================
--- libmicrohttpd/src/testcurl/test_process_headers.c   2015-04-14 22:49:27 UTC 
(rev 35536)
+++ libmicrohttpd/src/testcurl/test_process_headers.c   2015-04-15 01:19:44 UTC 
(rev 35537)
@@ -20,7 +20,7 @@
 */
 
 /**
- * @file daemontest_process_headers.c
+ * @file test_process_headers.c
  * @brief  Testcase for HTTP header access
  * @author Christian Grothoff
  */
@@ -422,10 +422,8 @@
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
-  if (0 != curl_global_init (CURL_GLOBAL_WIN32))
-    return 2;
-  errorCount += testInternalGet ();
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   errorCount += testMultithreadedGet ();
   errorCount += testMultithreadedPoolGet ();
   errorCount += testExternalGet ();

Modified: libmicrohttpd/src/testcurl/test_put.c
===================================================================
--- libmicrohttpd/src/testcurl/test_put.c       2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testcurl/test_put.c       2015-04-15 01:19:44 UTC (rev 
35537)
@@ -425,7 +425,8 @@
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testInternalPut ();

Modified: libmicrohttpd/src/testcurl/test_quiesce.c
===================================================================
--- libmicrohttpd/src/testcurl/test_quiesce.c   2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testcurl/test_quiesce.c   2015-04-15 01:19:44 UTC (rev 
35537)
@@ -1,6 +1,6 @@
 /*
      This file is part of libmicrohttpd
-     Copyright (C) 2013 Christian Grothoff
+     Copyright (C) 2013, 2015 Christian Grothoff
 
      libmicrohttpd is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -17,9 +17,8 @@
      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
      Boston, MA 02111-1307, USA.
 */
-
 /**
- * @file daemontest_quiesce.c
+ * @file test_quiesce.c
  * @brief  Testcase for libmicrohttpd quiescing
  * @author Christian Grothoff
  */
@@ -47,9 +46,7 @@
 #define CPU_COUNT 2
 #endif
 
-static int oneone;
 
-
 struct CBC
 {
   char *buf;
@@ -171,10 +168,7 @@
   curl_easy_setopt (c, CURLOPT_FAILONERROR, 1);
   curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, 150L);
   curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, 150L);
-  if (oneone)
-    curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
-  else
-    curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
+  curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
   /* NOTE: use of CONNECTTIMEOUT without also
      setting NOSIGNAL results in really weird
      crashes on my system!*/
@@ -439,7 +433,6 @@
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testGet (MHD_USE_SELECT_INTERNALLY, 0, 0);

Modified: libmicrohttpd/src/testcurl/test_timeout.c
===================================================================
--- libmicrohttpd/src/testcurl/test_timeout.c   2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testcurl/test_timeout.c   2015-04-15 01:19:44 UTC (rev 
35537)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file daemontest_timeout.c
+ * @file test_timeout.c
  * @brief  Testcase for libmicrohttpd PUT operations
  * @author Matthias Wachs
  */
@@ -271,13 +271,13 @@
 }
 
 
-
 int
 main (int argc, char *const *argv)
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 16;
   errorCount += testWithoutTimeout ();

Modified: libmicrohttpd/src/testcurl/test_urlparse.c
===================================================================
--- libmicrohttpd/src/testcurl/test_urlparse.c  2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testcurl/test_urlparse.c  2015-04-15 01:19:44 UTC (rev 
35537)
@@ -179,7 +179,8 @@
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testInternalGet (0);

Modified: libmicrohttpd/src/testzzuf/test_get.c
===================================================================
--- libmicrohttpd/src/testzzuf/test_get.c       2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testzzuf/test_get.c       2015-04-15 01:19:44 UTC (rev 
35537)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file daemontest_get.c
+ * @file test_get.c
  * @brief  Testcase for libmicrohttpd GET operations
  * @author Christian Grothoff
  */
@@ -295,13 +295,13 @@
 }
 
 
-
 int
 main (int argc, char *const *argv)
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testInternalGet ();

Modified: libmicrohttpd/src/testzzuf/test_long_header.c
===================================================================
--- libmicrohttpd/src/testzzuf/test_long_header.c       2015-04-14 22:49:27 UTC 
(rev 35536)
+++ libmicrohttpd/src/testzzuf/test_long_header.c       2015-04-15 01:19:44 UTC 
(rev 35537)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file daemontest_long_header.c
+ * @file test_long_header.c
  * @brief  Testcase for libmicrohttpd handling of very long headers
  * @author Christian Grothoff
  */
@@ -215,12 +215,14 @@
   return 0;
 }
 
+
 int
 main (int argc, char *const *argv)
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testLongUrlGet ();

Modified: libmicrohttpd/src/testzzuf/test_post.c
===================================================================
--- libmicrohttpd/src/testzzuf/test_post.c      2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testzzuf/test_post.c      2015-04-15 01:19:44 UTC (rev 
35537)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file daemontest_post.c
+ * @file test_post.c
  * @brief  Testcase for libmicrohttpd POST operations using URL-encoding
  * @author Christian Grothoff
  */
@@ -375,13 +375,13 @@
 }
 
 
-
 int
 main (int argc, char *const *argv)
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testInternalPost ();

Modified: libmicrohttpd/src/testzzuf/test_post_form.c
===================================================================
--- libmicrohttpd/src/testzzuf/test_post_form.c 2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testzzuf/test_post_form.c 2015-04-15 01:19:44 UTC (rev 
35537)
@@ -391,13 +391,13 @@
 }
 
 
-
 int
 main (int argc, char *const *argv)
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testInternalPost ();

Modified: libmicrohttpd/src/testzzuf/test_put.c
===================================================================
--- libmicrohttpd/src/testzzuf/test_put.c       2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testzzuf/test_put.c       2015-04-15 01:19:44 UTC (rev 
35537)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file daemontest_put.c
+ * @file test_put.c
  * @brief  Testcase for libmicrohttpd PUT operations
  * @author Christian Grothoff
  */
@@ -342,13 +342,13 @@
 }
 
 
-
 int
 main (int argc, char *const *argv)
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testInternalPut ();

Modified: libmicrohttpd/src/testzzuf/test_put_large.c
===================================================================
--- libmicrohttpd/src/testzzuf/test_put_large.c 2015-04-14 22:49:27 UTC (rev 
35536)
+++ libmicrohttpd/src/testzzuf/test_put_large.c 2015-04-15 01:19:44 UTC (rev 
35537)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file daemontest_large_put.c
+ * @file test_put_large.c
  * @brief  Testcase for libmicrohttpd PUT operations
  * @author Christian Grothoff
  */
@@ -360,13 +360,13 @@
 }
 
 
-
 int
 main (int argc, char *const *argv)
 {
   unsigned int errorCount = 0;
 
-  oneone = NULL != strstr (argv[0], "11");
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   put_buffer = malloc (PUT_SIZE);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]