aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_put_chunked.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_put_chunked.c')
-rw-r--r--src/testcurl/test_put_chunked.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/testcurl/test_put_chunked.c b/src/testcurl/test_put_chunked.c
index 7779b315..3ec998d8 100644
--- a/src/testcurl/test_put_chunked.c
+++ b/src/testcurl/test_put_chunked.c
@@ -56,8 +56,8 @@ struct CBC
56static size_t 56static size_t
57putBuffer (void *stream, size_t size, size_t nmemb, void *ptr) 57putBuffer (void *stream, size_t size, size_t nmemb, void *ptr)
58{ 58{
59 unsigned int *pos = ptr; 59 size_t *pos = ptr;
60 unsigned int wrt; 60 size_t wrt;
61 61
62 wrt = size * nmemb; 62 wrt = size * nmemb;
63 if (wrt > 8 - (*pos)) 63 if (wrt > 8 - (*pos))
@@ -92,10 +92,10 @@ ahc_echo (void *cls,
92 const char *upload_data, size_t *upload_data_size, 92 const char *upload_data, size_t *upload_data_size,
93 void **req_cls) 93 void **req_cls)
94{ 94{
95 int *done = cls; 95 size_t *done = cls;
96 struct MHD_Response *response; 96 struct MHD_Response *response;
97 enum MHD_Result ret; 97 enum MHD_Result ret;
98 int have; 98 size_t have;
99 (void) version; (void) req_cls; /* Unused. Silent compiler warning. */ 99 (void) version; (void) req_cls; /* Unused. Silent compiler warning. */
100 100
101 if (0 != strcmp ("PUT", method)) 101 if (0 != strcmp ("PUT", method))
@@ -133,17 +133,17 @@ ahc_echo (void *cls,
133} 133}
134 134
135 135
136static int 136static unsigned int
137testInternalPut (void) 137testInternalPut (void)
138{ 138{
139 struct MHD_Daemon *d; 139 struct MHD_Daemon *d;
140 CURL *c; 140 CURL *c;
141 char buf[2048]; 141 char buf[2048];
142 struct CBC cbc; 142 struct CBC cbc;
143 unsigned int pos = 0; 143 size_t pos = 0;
144 int done_flag = 0; 144 size_t done_flag = 0;
145 CURLcode errornum; 145 CURLcode errornum;
146 int port; 146 uint16_t port;
147 147
148 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 148 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
149 port = 0; 149 port = 0;
@@ -166,7 +166,7 @@ testInternalPut (void)
166 { 166 {
167 MHD_stop_daemon (d); return 32; 167 MHD_stop_daemon (d); return 32;
168 } 168 }
169 port = (int) dinfo->port; 169 port = dinfo->port;
170 } 170 }
171 c = curl_easy_init (); 171 c = curl_easy_init ();
172 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); 172 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world");
@@ -207,17 +207,17 @@ testInternalPut (void)
207} 207}
208 208
209 209
210static int 210static unsigned int
211testMultithreadedPut (void) 211testMultithreadedPut (void)
212{ 212{
213 struct MHD_Daemon *d; 213 struct MHD_Daemon *d;
214 CURL *c; 214 CURL *c;
215 char buf[2048]; 215 char buf[2048];
216 struct CBC cbc; 216 struct CBC cbc;
217 unsigned int pos = 0; 217 size_t pos = 0;
218 int done_flag = 0; 218 size_t done_flag = 0;
219 CURLcode errornum; 219 CURLcode errornum;
220 int port; 220 uint16_t port;
221 221
222 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 222 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
223 port = 0; 223 port = 0;
@@ -241,7 +241,7 @@ testMultithreadedPut (void)
241 { 241 {
242 MHD_stop_daemon (d); return 32; 242 MHD_stop_daemon (d); return 32;
243 } 243 }
244 port = (int) dinfo->port; 244 port = dinfo->port;
245 } 245 }
246 c = curl_easy_init (); 246 c = curl_easy_init ();
247 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); 247 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world");
@@ -283,17 +283,17 @@ testMultithreadedPut (void)
283} 283}
284 284
285 285
286static int 286static unsigned int
287testMultithreadedPoolPut (void) 287testMultithreadedPoolPut (void)
288{ 288{
289 struct MHD_Daemon *d; 289 struct MHD_Daemon *d;
290 CURL *c; 290 CURL *c;
291 char buf[2048]; 291 char buf[2048];
292 struct CBC cbc; 292 struct CBC cbc;
293 unsigned int pos = 0; 293 size_t pos = 0;
294 int done_flag = 0; 294 size_t done_flag = 0;
295 CURLcode errornum; 295 CURLcode errornum;
296 int port; 296 uint16_t port;
297 297
298 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 298 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
299 port = 0; 299 port = 0;
@@ -318,7 +318,7 @@ testMultithreadedPoolPut (void)
318 { 318 {
319 MHD_stop_daemon (d); return 32; 319 MHD_stop_daemon (d); return 32;
320 } 320 }
321 port = (int) dinfo->port; 321 port = dinfo->port;
322 } 322 }
323 c = curl_easy_init (); 323 c = curl_easy_init ();
324 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); 324 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world");
@@ -360,7 +360,7 @@ testMultithreadedPoolPut (void)
360} 360}
361 361
362 362
363static int 363static unsigned int
364testExternalPut (void) 364testExternalPut (void)
365{ 365{
366 struct MHD_Daemon *d; 366 struct MHD_Daemon *d;
@@ -382,9 +382,9 @@ testExternalPut (void)
382 struct CURLMsg *msg; 382 struct CURLMsg *msg;
383 time_t start; 383 time_t start;
384 struct timeval tv; 384 struct timeval tv;
385 unsigned int pos = 0; 385 size_t pos = 0;
386 int done_flag = 0; 386 size_t done_flag = 0;
387 int port; 387 uint16_t port;
388 388
389 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 389 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
390 port = 0; 390 port = 0;
@@ -408,7 +408,7 @@ testExternalPut (void)
408 { 408 {
409 MHD_stop_daemon (d); return 32; 409 MHD_stop_daemon (d); return 32;
410 } 410 }
411 port = (int) dinfo->port; 411 port = dinfo->port;
412 } 412 }
413 c = curl_easy_init (); 413 c = curl_easy_init ();
414 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); 414 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world");