aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2007-12-16 10:49:37 +0000
committerChristian Grothoff <christian@grothoff.org>2007-12-16 10:49:37 +0000
commit4e5c09345917310d428c42af3f2c436494b276e2 (patch)
treee1873e0c143666ccc89ea71235c920b20b5f93a1
parentf794d6b09631610e4473d6e356f24b09195105bf (diff)
downloadlibmicrohttpd-4e5c09345917310d428c42af3f2c436494b276e2.tar.gz
libmicrohttpd-4e5c09345917310d428c42af3f2c436494b276e2.zip
fix
-rw-r--r--src/daemon/daemontest_post_loop.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/daemon/daemontest_post_loop.c b/src/daemon/daemontest_post_loop.c
index f1555c16..feedcd8c 100644
--- a/src/daemon/daemontest_post_loop.c
+++ b/src/daemon/daemontest_post_loop.c
@@ -115,7 +115,7 @@ testInternalPost ()
115 return 1; 115 return 1;
116 for (i = 0; i < LOOPCOUNT; i++) 116 for (i = 0; i < LOOPCOUNT; i++)
117 { 117 {
118 if (0 == i % 100) 118 if (99 == i % 100)
119 fprintf (stderr, "."); 119 fprintf (stderr, ".");
120 c = curl_easy_init (); 120 c = curl_easy_init ();
121 cbc.pos = 0; 121 cbc.pos = 0;
@@ -155,7 +155,8 @@ testInternalPost ()
155 } 155 }
156 } 156 }
157 MHD_stop_daemon (d); 157 MHD_stop_daemon (d);
158 fprintf (stderr, "\n"); 158 if (LOOPCOUNT >= 99)
159 fprintf (stderr, "\n");
159 return 0; 160 return 0;
160} 161}
161 162
@@ -178,7 +179,7 @@ testMultithreadedPost ()
178 return 16; 179 return 16;
179 for (i = 0; i < LOOPCOUNT; i++) 180 for (i = 0; i < LOOPCOUNT; i++)
180 { 181 {
181 if (0 == i % 100) 182 if (99 == i % 100)
182 fprintf (stderr, "."); 183 fprintf (stderr, ".");
183 c = curl_easy_init (); 184 c = curl_easy_init ();
184 cbc.pos = 0; 185 cbc.pos = 0;
@@ -218,7 +219,8 @@ testMultithreadedPost ()
218 } 219 }
219 } 220 }
220 MHD_stop_daemon (d); 221 MHD_stop_daemon (d);
221 fprintf (stderr, "\n"); 222 if (LOOPCOUNT >= 99)
223 fprintf (stderr, "\n");
222 return 0; 224 return 0;
223} 225}
224 226
@@ -261,8 +263,7 @@ testExternalPost ()
261 } 263 }
262 for (i = 0; i < LOOPCOUNT; i++) 264 for (i = 0; i < LOOPCOUNT; i++)
263 { 265 {
264 if (0 == i % 100) 266 fprintf (stderr, ".");
265 fprintf (stderr, ".");
266 c = curl_easy_init (); 267 c = curl_easy_init ();
267 cbc.pos = 0; 268 cbc.pos = 0;
268 buf[0] = '\0'; 269 buf[0] = '\0';
@@ -310,7 +311,7 @@ testExternalPost ()
310 MHD_stop_daemon (d); 311 MHD_stop_daemon (d);
311 return 2048; 312 return 2048;
312 } 313 }
313 if (MHD_YES != MHD_get_fdset (d, &rs, &ws, &es, &max)) 314 if (MHD_YES != MHD_get_fdset (d, &rs, &ws, &es, &max))
314 { 315 {
315 curl_multi_remove_handle (multi, c); 316 curl_multi_remove_handle (multi, c);
316 curl_multi_cleanup (multi); 317 curl_multi_cleanup (multi);
@@ -319,7 +320,7 @@ testExternalPost ()
319 return 4096; 320 return 4096;
320 } 321 }
321 if (MHD_NO == MHD_get_timeout (d, &timeout)) 322 if (MHD_NO == MHD_get_timeout (d, &timeout))
322 timeout = 1000000; /* 1000s == INFTY */ 323 timeout = 100; /* 100ms == INFTY -- CURL bug... */
323 if ((CURLM_OK == curl_multi_timeout (multi, &ctimeout)) && 324 if ((CURLM_OK == curl_multi_timeout (multi, &ctimeout)) &&
324 (ctimeout < timeout) && (ctimeout >= 0)) 325 (ctimeout < timeout) && (ctimeout >= 0))
325 timeout = ctimeout; 326 timeout = ctimeout;