aboutsummaryrefslogtreecommitdiff
path: root/src/testzzuf/test_get.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2019-05-26 18:17:32 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2019-05-26 18:17:32 +0300
commit3894027826cbc6688428d8d54e2debe25b1d0661 (patch)
tree69c3fa8140a365da5b138aa4519b154e2063c7b8 /src/testzzuf/test_get.c
parent710d79a2ea4647d73172ba9aa032a4055bea14a8 (diff)
downloadlibmicrohttpd-3894027826cbc6688428d8d54e2debe25b1d0661.tar.gz
libmicrohttpd-3894027826cbc6688428d8d54e2debe25b1d0661.zip
tests: properly setup CURL options
Diffstat (limited to 'src/testzzuf/test_get.c')
-rw-r--r--src/testzzuf/test_get.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/testzzuf/test_get.c b/src/testzzuf/test_get.c
index 223b85e5..08954226 100644
--- a/src/testzzuf/test_get.c
+++ b/src/testzzuf/test_get.c
@@ -117,7 +117,7 @@ testInternalGet ()
117 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world"); 117 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
118 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 118 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
119 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 119 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
120 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 120 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1L);
121 curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT); 121 curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT);
122 curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT); 122 curl_easy_setopt (c, CURLOPT_CONNECTTIMEOUT_MS, CURL_TIMEOUT);
123 if (oneone) 123 if (oneone)
@@ -127,7 +127,7 @@ testInternalGet ()
127 /* NOTE: use of CONNECTTIMEOUT without also 127 /* NOTE: use of CONNECTTIMEOUT without also
128 * setting NOSIGNAL results in really weird 128 * setting NOSIGNAL results in really weird
129 * crashes on my system! */ 129 * crashes on my system! */
130 curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); 130 curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1L);
131 curl_easy_perform (c); 131 curl_easy_perform (c);
132 curl_easy_cleanup (c); 132 curl_easy_cleanup (c);
133 } 133 }
@@ -161,7 +161,7 @@ testMultithreadedGet ()
161 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world"); 161 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
162 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 162 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
163 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 163 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
164 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 164 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1L);
165 curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT); 165 curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT);
166 if (oneone) 166 if (oneone)
167 curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); 167 curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
@@ -171,7 +171,7 @@ testMultithreadedGet ()
171 /* NOTE: use of CONNECTTIMEOUT without also 171 /* NOTE: use of CONNECTTIMEOUT without also
172 * setting NOSIGNAL results in really weird 172 * setting NOSIGNAL results in really weird
173 * crashes on my system! */ 173 * crashes on my system! */
174 curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); 174 curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1L);
175 curl_easy_perform (c); 175 curl_easy_perform (c);
176 curl_easy_cleanup (c); 176 curl_easy_cleanup (c);
177 } 177 }
@@ -222,7 +222,7 @@ testExternalGet ()
222 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world"); 222 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1:11081/hello_world");
223 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer); 223 curl_easy_setopt (c, CURLOPT_WRITEFUNCTION, &copyBuffer);
224 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc); 224 curl_easy_setopt (c, CURLOPT_WRITEDATA, &cbc);
225 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); 225 curl_easy_setopt (c, CURLOPT_FAILONERROR, 1L);
226 if (oneone) 226 if (oneone)
227 curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); 227 curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
228 else 228 else
@@ -232,7 +232,7 @@ testExternalGet ()
232 /* NOTE: use of CONNECTTIMEOUT without also 232 /* NOTE: use of CONNECTTIMEOUT without also
233 * setting NOSIGNAL results in really weird 233 * setting NOSIGNAL results in really weird
234 * crashes on my system! */ 234 * crashes on my system! */
235 curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); 235 curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1L);
236 mret = curl_multi_add_handle (multi, c); 236 mret = curl_multi_add_handle (multi, c);
237 if (mret != CURLM_OK) 237 if (mret != CURLM_OK)
238 { 238 {