aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_patch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_patch.c')
-rw-r--r--src/testcurl/test_patch.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/testcurl/test_patch.c b/src/testcurl/test_patch.c
index ffdbf229..d5608335 100644
--- a/src/testcurl/test_patch.c
+++ b/src/testcurl/test_patch.c
@@ -58,8 +58,8 @@ struct CBC
58static size_t 58static size_t
59putBuffer (void *stream, size_t size, size_t nmemb, void *ptr) 59putBuffer (void *stream, size_t size, size_t nmemb, void *ptr)
60{ 60{
61 unsigned int *pos = ptr; 61 size_t *pos = ptr;
62 unsigned int wrt; 62 size_t wrt;
63 63
64 wrt = size * nmemb; 64 wrt = size * nmemb;
65 if (wrt > 8 - (*pos)) 65 if (wrt > 8 - (*pos))
@@ -126,7 +126,7 @@ ahc_echo (void *cls,
126static CURL * 126static CURL *
127setup_curl (long port, 127setup_curl (long port,
128 struct CBC *cbc, 128 struct CBC *cbc,
129 unsigned int *pos) 129 size_t *pos)
130{ 130{
131 CURL *c; 131 CURL *c;
132 132
@@ -156,17 +156,17 @@ setup_curl (long port,
156} 156}
157 157
158 158
159static int 159static unsigned int
160testInternalPut (void) 160testInternalPut (void)
161{ 161{
162 struct MHD_Daemon *d; 162 struct MHD_Daemon *d;
163 CURL *c; 163 CURL *c;
164 char buf[2048]; 164 char buf[2048];
165 struct CBC cbc; 165 struct CBC cbc;
166 unsigned int pos = 0; 166 size_t pos = 0;
167 int done_flag = 0; 167 int done_flag = 0;
168 CURLcode errornum; 168 CURLcode errornum;
169 int port; 169 uint16_t port;
170 170
171 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 171 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
172 port = 0; 172 port = 0;
@@ -193,7 +193,7 @@ testInternalPut (void)
193 { 193 {
194 MHD_stop_daemon (d); return 32; 194 MHD_stop_daemon (d); return 32;
195 } 195 }
196 port = (int) dinfo->port; 196 port = dinfo->port;
197 } 197 }
198 c = setup_curl (port, &cbc, &pos); 198 c = setup_curl (port, &cbc, &pos);
199 if (CURLE_OK != (errornum = curl_easy_perform (c))) 199 if (CURLE_OK != (errornum = curl_easy_perform (c)))
@@ -215,17 +215,17 @@ testInternalPut (void)
215} 215}
216 216
217 217
218static int 218static unsigned int
219testMultithreadedPut (void) 219testMultithreadedPut (void)
220{ 220{
221 struct MHD_Daemon *d; 221 struct MHD_Daemon *d;
222 CURL *c; 222 CURL *c;
223 char buf[2048]; 223 char buf[2048];
224 struct CBC cbc; 224 struct CBC cbc;
225 unsigned int pos = 0; 225 size_t pos = 0;
226 int done_flag = 0; 226 int done_flag = 0;
227 CURLcode errornum; 227 CURLcode errornum;
228 int port; 228 uint16_t port;
229 229
230 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 230 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
231 port = 0; 231 port = 0;
@@ -253,7 +253,7 @@ testMultithreadedPut (void)
253 { 253 {
254 MHD_stop_daemon (d); return 32; 254 MHD_stop_daemon (d); return 32;
255 } 255 }
256 port = (int) dinfo->port; 256 port = dinfo->port;
257 } 257 }
258 c = setup_curl (port, &cbc, &pos); 258 c = setup_curl (port, &cbc, &pos);
259 if (CURLE_OK != (errornum = curl_easy_perform (c))) 259 if (CURLE_OK != (errornum = curl_easy_perform (c)))
@@ -276,17 +276,17 @@ testMultithreadedPut (void)
276} 276}
277 277
278 278
279static int 279static unsigned int
280testMultithreadedPoolPut (void) 280testMultithreadedPoolPut (void)
281{ 281{
282 struct MHD_Daemon *d; 282 struct MHD_Daemon *d;
283 CURL *c; 283 CURL *c;
284 char buf[2048]; 284 char buf[2048];
285 struct CBC cbc; 285 struct CBC cbc;
286 unsigned int pos = 0; 286 size_t pos = 0;
287 int done_flag = 0; 287 int done_flag = 0;
288 CURLcode errornum; 288 CURLcode errornum;
289 int port; 289 uint16_t port;
290 290
291 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 291 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
292 port = 0; 292 port = 0;
@@ -315,7 +315,7 @@ testMultithreadedPoolPut (void)
315 { 315 {
316 MHD_stop_daemon (d); return 32; 316 MHD_stop_daemon (d); return 32;
317 } 317 }
318 port = (int) dinfo->port; 318 port = dinfo->port;
319 } 319 }
320 c = setup_curl (port, &cbc, &pos); 320 c = setup_curl (port, &cbc, &pos);
321 if (CURLE_OK != (errornum = curl_easy_perform (c))) 321 if (CURLE_OK != (errornum = curl_easy_perform (c)))
@@ -338,7 +338,7 @@ testMultithreadedPoolPut (void)
338} 338}
339 339
340 340
341static int 341static unsigned int
342testExternalPut (void) 342testExternalPut (void)
343{ 343{
344 struct MHD_Daemon *d; 344 struct MHD_Daemon *d;
@@ -356,9 +356,9 @@ testExternalPut (void)
356 struct CURLMsg *msg; 356 struct CURLMsg *msg;
357 time_t start; 357 time_t start;
358 struct timeval tv; 358 struct timeval tv;
359 unsigned int pos = 0; 359 size_t pos = 0;
360 int done_flag = 0; 360 int done_flag = 0;
361 int port; 361 uint16_t port;
362 362
363 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 363 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
364 port = 0; 364 port = 0;
@@ -386,7 +386,7 @@ testExternalPut (void)
386 { 386 {
387 MHD_stop_daemon (d); return 32; 387 MHD_stop_daemon (d); return 32;
388 } 388 }
389 port = (int) dinfo->port; 389 port = dinfo->port;
390 } 390 }
391 c = setup_curl (port, &cbc, &pos); 391 c = setup_curl (port, &cbc, &pos);
392 392