aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_put.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_put.c')
-rw-r--r--src/testcurl/test_put.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/testcurl/test_put.c b/src/testcurl/test_put.c
index 67318934..bc16ef52 100644
--- a/src/testcurl/test_put.c
+++ b/src/testcurl/test_put.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))
@@ -123,17 +123,17 @@ ahc_echo (void *cls,
123} 123}
124 124
125 125
126static int 126static unsigned int
127testInternalPut (void) 127testInternalPut (void)
128{ 128{
129 struct MHD_Daemon *d; 129 struct MHD_Daemon *d;
130 CURL *c; 130 CURL *c;
131 char buf[2048]; 131 char buf[2048];
132 struct CBC cbc; 132 struct CBC cbc;
133 unsigned int pos = 0; 133 size_t pos = 0;
134 int done_flag = 0; 134 int done_flag = 0;
135 CURLcode errornum; 135 CURLcode errornum;
136 int port; 136 uint16_t port;
137 137
138 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 138 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
139 port = 0; 139 port = 0;
@@ -160,7 +160,7 @@ testInternalPut (void)
160 { 160 {
161 MHD_stop_daemon (d); return 32; 161 MHD_stop_daemon (d); return 32;
162 } 162 }
163 port = (int) dinfo->port; 163 port = dinfo->port;
164 } 164 }
165 c = curl_easy_init (); 165 c = curl_easy_init ();
166 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); 166 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world");
@@ -201,17 +201,17 @@ testInternalPut (void)
201} 201}
202 202
203 203
204static int 204static unsigned int
205testMultithreadedPut (void) 205testMultithreadedPut (void)
206{ 206{
207 struct MHD_Daemon *d; 207 struct MHD_Daemon *d;
208 CURL *c; 208 CURL *c;
209 char buf[2048]; 209 char buf[2048];
210 struct CBC cbc; 210 struct CBC cbc;
211 unsigned int pos = 0; 211 size_t pos = 0;
212 int done_flag = 0; 212 int done_flag = 0;
213 CURLcode errornum; 213 CURLcode errornum;
214 int port; 214 uint16_t port;
215 215
216 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 216 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
217 port = 0; 217 port = 0;
@@ -239,7 +239,7 @@ testMultithreadedPut (void)
239 { 239 {
240 MHD_stop_daemon (d); return 32; 240 MHD_stop_daemon (d); return 32;
241 } 241 }
242 port = (int) dinfo->port; 242 port = dinfo->port;
243 } 243 }
244 c = curl_easy_init (); 244 c = curl_easy_init ();
245 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); 245 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world");
@@ -281,17 +281,17 @@ testMultithreadedPut (void)
281} 281}
282 282
283 283
284static int 284static unsigned int
285testMultithreadedPoolPut (void) 285testMultithreadedPoolPut (void)
286{ 286{
287 struct MHD_Daemon *d; 287 struct MHD_Daemon *d;
288 CURL *c; 288 CURL *c;
289 char buf[2048]; 289 char buf[2048];
290 struct CBC cbc; 290 struct CBC cbc;
291 unsigned int pos = 0; 291 size_t pos = 0;
292 int done_flag = 0; 292 int done_flag = 0;
293 CURLcode errornum; 293 CURLcode errornum;
294 int port; 294 uint16_t port;
295 295
296 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 296 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
297 port = 0; 297 port = 0;
@@ -320,7 +320,7 @@ testMultithreadedPoolPut (void)
320 { 320 {
321 MHD_stop_daemon (d); return 32; 321 MHD_stop_daemon (d); return 32;
322 } 322 }
323 port = (int) dinfo->port; 323 port = dinfo->port;
324 } 324 }
325 c = curl_easy_init (); 325 c = curl_easy_init ();
326 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); 326 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world");
@@ -362,7 +362,7 @@ testMultithreadedPoolPut (void)
362} 362}
363 363
364 364
365static int 365static unsigned int
366testExternalPut (void) 366testExternalPut (void)
367{ 367{
368 struct MHD_Daemon *d; 368 struct MHD_Daemon *d;
@@ -380,9 +380,9 @@ testExternalPut (void)
380 struct CURLMsg *msg; 380 struct CURLMsg *msg;
381 time_t start; 381 time_t start;
382 struct timeval tv; 382 struct timeval tv;
383 unsigned int pos = 0; 383 size_t pos = 0;
384 int done_flag = 0; 384 int done_flag = 0;
385 int port; 385 uint16_t port;
386 386
387 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT)) 387 if (MHD_NO != MHD_is_feature_supported (MHD_FEATURE_AUTODETECT_BIND_PORT))
388 port = 0; 388 port = 0;
@@ -410,7 +410,7 @@ testExternalPut (void)
410 { 410 {
411 MHD_stop_daemon (d); return 32; 411 MHD_stop_daemon (d); return 32;
412 } 412 }
413 port = (int) dinfo->port; 413 port = dinfo->port;
414 } 414 }
415 c = curl_easy_init (); 415 c = curl_easy_init ();
416 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world"); 416 curl_easy_setopt (c, CURLOPT_URL, "http://127.0.0.1/hello_world");