diff options
Diffstat (limited to 'src/testcurl')
43 files changed, 177 insertions, 177 deletions
diff --git a/src/testcurl/https/test_empty_response.c b/src/testcurl/https/test_empty_response.c index 1a466dd7..c2dcf300 100644 --- a/src/testcurl/https/test_empty_response.c +++ b/src/testcurl/https/test_empty_response.c | |||
@@ -45,12 +45,12 @@ ahc_echo (void *cls, | |||
45 | const char *method, | 45 | const char *method, |
46 | const char *version, | 46 | const char *version, |
47 | const char *upload_data, size_t *upload_data_size, | 47 | const char *upload_data, size_t *upload_data_size, |
48 | void **unused) | 48 | void **req_cls) |
49 | { | 49 | { |
50 | struct MHD_Response *response; | 50 | struct MHD_Response *response; |
51 | enum MHD_Result ret; | 51 | enum MHD_Result ret; |
52 | (void) cls; (void) url; (void) method; (void) version; /* Unused. Silent compiler warning. */ | 52 | (void) cls; (void) url; (void) method; (void) version; /* Unused. Silent compiler warning. */ |
53 | (void) upload_data; (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ | 53 | (void) upload_data; (void) upload_data_size; (void) req_cls; /* Unused. Silent compiler warning. */ |
54 | 54 | ||
55 | response = MHD_create_response_from_buffer (0, NULL, | 55 | response = MHD_create_response_from_buffer (0, NULL, |
56 | MHD_RESPMEM_PERSISTENT); | 56 | MHD_RESPMEM_PERSISTENT); |
diff --git a/src/testcurl/https/test_https_get.c b/src/testcurl/https/test_https_get.c index 503191e0..968a0b96 100644 --- a/src/testcurl/https/test_https_get.c +++ b/src/testcurl/https/test_https_get.c | |||
@@ -99,7 +99,7 @@ ahc_empty (void *cls, | |||
99 | const char *version, | 99 | const char *version, |
100 | const char *upload_data, | 100 | const char *upload_data, |
101 | size_t *upload_data_size, | 101 | size_t *upload_data_size, |
102 | void **unused) | 102 | void **req_cls) |
103 | { | 103 | { |
104 | static int ptr; | 104 | static int ptr; |
105 | struct MHD_Response *response; | 105 | struct MHD_Response *response; |
@@ -114,12 +114,12 @@ ahc_empty (void *cls, | |||
114 | if (0 != strcmp ("GET", | 114 | if (0 != strcmp ("GET", |
115 | method)) | 115 | method)) |
116 | return MHD_NO; /* unexpected method */ | 116 | return MHD_NO; /* unexpected method */ |
117 | if (&ptr != *unused) | 117 | if (&ptr != *req_cls) |
118 | { | 118 | { |
119 | *unused = &ptr; | 119 | *req_cls = &ptr; |
120 | return MHD_YES; | 120 | return MHD_YES; |
121 | } | 121 | } |
122 | *unused = NULL; | 122 | *req_cls = NULL; |
123 | response = MHD_create_response_from_buffer (0, | 123 | response = MHD_create_response_from_buffer (0, |
124 | NULL, | 124 | NULL, |
125 | MHD_RESPMEM_PERSISTENT); | 125 | MHD_RESPMEM_PERSISTENT); |
diff --git a/src/testcurl/https/test_https_get_iovec.c b/src/testcurl/https/test_https_get_iovec.c index 615ef340..3bdb610f 100644 --- a/src/testcurl/https/test_https_get_iovec.c +++ b/src/testcurl/https/test_https_get_iovec.c | |||
@@ -91,7 +91,7 @@ iovec_ahc (void *cls, | |||
91 | const char *version, | 91 | const char *version, |
92 | const char *upload_data, | 92 | const char *upload_data, |
93 | size_t *upload_data_size, | 93 | size_t *upload_data_size, |
94 | void **ptr) | 94 | void **req_cls) |
95 | { | 95 | { |
96 | static int aptr; | 96 | static int aptr; |
97 | struct MHD_Response *response; | 97 | struct MHD_Response *response; |
@@ -105,13 +105,13 @@ iovec_ahc (void *cls, | |||
105 | 105 | ||
106 | if (0 != strcmp (method, MHD_HTTP_METHOD_GET)) | 106 | if (0 != strcmp (method, MHD_HTTP_METHOD_GET)) |
107 | return MHD_NO; /* unexpected method */ | 107 | return MHD_NO; /* unexpected method */ |
108 | if (&aptr != *ptr) | 108 | if (&aptr != *req_cls) |
109 | { | 109 | { |
110 | /* do never respond on first call */ | 110 | /* do never respond on first call */ |
111 | *ptr = &aptr; | 111 | *req_cls = &aptr; |
112 | return MHD_YES; | 112 | return MHD_YES; |
113 | } | 113 | } |
114 | *ptr = NULL; /* reset when done */ | 114 | *req_cls = NULL; /* reset when done */ |
115 | 115 | ||
116 | /* Create some test data. */ | 116 | /* Create some test data. */ |
117 | if (NULL == (data = malloc (TESTSTR_SIZE))) | 117 | if (NULL == (data = malloc (TESTSTR_SIZE))) |
@@ -248,7 +248,7 @@ ahc_empty (void *cls, | |||
248 | const char *version, | 248 | const char *version, |
249 | const char *upload_data, | 249 | const char *upload_data, |
250 | size_t *upload_data_size, | 250 | size_t *upload_data_size, |
251 | void **unused) | 251 | void **req_cls) |
252 | { | 252 | { |
253 | static int ptr; | 253 | static int ptr; |
254 | struct MHD_Response *response; | 254 | struct MHD_Response *response; |
@@ -264,12 +264,12 @@ ahc_empty (void *cls, | |||
264 | if (0 != strcmp ("GET", | 264 | if (0 != strcmp ("GET", |
265 | method)) | 265 | method)) |
266 | return MHD_NO; /* unexpected method */ | 266 | return MHD_NO; /* unexpected method */ |
267 | if (&ptr != *unused) | 267 | if (&ptr != *req_cls) |
268 | { | 268 | { |
269 | *unused = &ptr; | 269 | *req_cls = &ptr; |
270 | return MHD_YES; | 270 | return MHD_YES; |
271 | } | 271 | } |
272 | *unused = NULL; | 272 | *req_cls = NULL; |
273 | 273 | ||
274 | iov.iov_base = NULL; | 274 | iov.iov_base = NULL; |
275 | iov.iov_len = 0; | 275 | iov.iov_len = 0; |
diff --git a/src/testcurl/https/test_https_get_select.c b/src/testcurl/https/test_https_get_select.c index 5c04aaab..65570aab 100644 --- a/src/testcurl/https/test_https_get_select.c +++ b/src/testcurl/https/test_https_get_select.c | |||
@@ -46,7 +46,7 @@ ahc_echo (void *cls, | |||
46 | const char *method, | 46 | const char *method, |
47 | const char *version, | 47 | const char *version, |
48 | const char *upload_data, size_t *upload_data_size, | 48 | const char *upload_data, size_t *upload_data_size, |
49 | void **unused) | 49 | void **req_cls) |
50 | { | 50 | { |
51 | static int ptr; | 51 | static int ptr; |
52 | const char *me = cls; | 52 | const char *me = cls; |
@@ -56,12 +56,12 @@ ahc_echo (void *cls, | |||
56 | 56 | ||
57 | if (0 != strcmp (me, method)) | 57 | if (0 != strcmp (me, method)) |
58 | return MHD_NO; /* unexpected method */ | 58 | return MHD_NO; /* unexpected method */ |
59 | if (&ptr != *unused) | 59 | if (&ptr != *req_cls) |
60 | { | 60 | { |
61 | *unused = &ptr; | 61 | *req_cls = &ptr; |
62 | return MHD_YES; | 62 | return MHD_YES; |
63 | } | 63 | } |
64 | *unused = NULL; | 64 | *req_cls = NULL; |
65 | response = MHD_create_response_from_buffer (strlen (url), | 65 | response = MHD_create_response_from_buffer (strlen (url), |
66 | (void *) url, | 66 | (void *) url, |
67 | MHD_RESPMEM_MUST_COPY); | 67 | MHD_RESPMEM_MUST_COPY); |
diff --git a/src/testcurl/https/test_https_session_info.c b/src/testcurl/https/test_https_session_info.c index 3a49ce60..e428e278 100644 --- a/src/testcurl/https/test_https_session_info.c +++ b/src/testcurl/https/test_https_session_info.c | |||
@@ -47,7 +47,7 @@ static enum MHD_Result | |||
47 | query_session_ahc (void *cls, struct MHD_Connection *connection, | 47 | query_session_ahc (void *cls, struct MHD_Connection *connection, |
48 | const char *url, const char *method, | 48 | const char *url, const char *method, |
49 | const char *version, const char *upload_data, | 49 | const char *version, const char *upload_data, |
50 | size_t *upload_data_size, void **ptr) | 50 | size_t *upload_data_size, void **req_cls) |
51 | { | 51 | { |
52 | struct MHD_Response *response; | 52 | struct MHD_Response *response; |
53 | enum MHD_Result ret; | 53 | enum MHD_Result ret; |
@@ -55,9 +55,9 @@ query_session_ahc (void *cls, struct MHD_Connection *connection, | |||
55 | (void) cls; (void) url; (void) method; (void) version; /* Unused. Silent compiler warning. */ | 55 | (void) cls; (void) url; (void) method; (void) version; /* Unused. Silent compiler warning. */ |
56 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ | 56 | (void) upload_data; (void) upload_data_size; /* Unused. Silent compiler warning. */ |
57 | 57 | ||
58 | if (NULL == *ptr) | 58 | if (NULL == *req_cls) |
59 | { | 59 | { |
60 | *ptr = (void *) &query_session_ahc; | 60 | *req_cls = (void *) &query_session_ahc; |
61 | return MHD_YES; | 61 | return MHD_YES; |
62 | } | 62 | } |
63 | 63 | ||
diff --git a/src/testcurl/https/tls_test_common.c b/src/testcurl/https/tls_test_common.c index 9cce3d94..606ac7a3 100644 --- a/src/testcurl/https/tls_test_common.c +++ b/src/testcurl/https/tls_test_common.c | |||
@@ -207,7 +207,7 @@ http_ahc (void *cls, | |||
207 | const char *version, | 207 | const char *version, |
208 | const char *upload_data, | 208 | const char *upload_data, |
209 | size_t *upload_data_size, | 209 | size_t *upload_data_size, |
210 | void **ptr) | 210 | void **req_cls) |
211 | { | 211 | { |
212 | static int aptr; | 212 | static int aptr; |
213 | struct MHD_Response *response; | 213 | struct MHD_Response *response; |
@@ -217,13 +217,13 @@ http_ahc (void *cls, | |||
217 | 217 | ||
218 | if (0 != strcmp (method, MHD_HTTP_METHOD_GET)) | 218 | if (0 != strcmp (method, MHD_HTTP_METHOD_GET)) |
219 | return MHD_NO; /* unexpected method */ | 219 | return MHD_NO; /* unexpected method */ |
220 | if (&aptr != *ptr) | 220 | if (&aptr != *req_cls) |
221 | { | 221 | { |
222 | /* do never respond on first call */ | 222 | /* do never respond on first call */ |
223 | *ptr = &aptr; | 223 | *req_cls = &aptr; |
224 | return MHD_YES; | 224 | return MHD_YES; |
225 | } | 225 | } |
226 | *ptr = NULL; /* reset when done */ | 226 | *req_cls = NULL; /* reset when done */ |
227 | response = MHD_create_response_from_buffer (strlen (test_data), | 227 | response = MHD_create_response_from_buffer (strlen (test_data), |
228 | (void *) test_data, | 228 | (void *) test_data, |
229 | MHD_RESPMEM_PERSISTENT); | 229 | MHD_RESPMEM_PERSISTENT); |
@@ -242,7 +242,7 @@ http_dummy_ahc (void *cls, | |||
242 | const char *version, | 242 | const char *version, |
243 | const char *upload_data, | 243 | const char *upload_data, |
244 | size_t *upload_data_size, | 244 | size_t *upload_data_size, |
245 | void **ptr) | 245 | void **req_cls) |
246 | { | 246 | { |
247 | (void) cls; | 247 | (void) cls; |
248 | (void) connection; | 248 | (void) connection; |
@@ -251,7 +251,7 @@ http_dummy_ahc (void *cls, | |||
251 | (void) version; /* Unused. Silent compiler warning. */ | 251 | (void) version; /* Unused. Silent compiler warning. */ |
252 | (void) upload_data; | 252 | (void) upload_data; |
253 | (void) upload_data_size; | 253 | (void) upload_data_size; |
254 | (void) ptr; /* Unused. Silent compiler warning. */ | 254 | (void) req_cls; /* Unused. Silent compiler warning. */ |
255 | return 0; | 255 | return 0; |
256 | } | 256 | } |
257 | 257 | ||
diff --git a/src/testcurl/https/tls_test_common.h b/src/testcurl/https/tls_test_common.h index a9af504d..b6a11172 100644 --- a/src/testcurl/https/tls_test_common.h +++ b/src/testcurl/https/tls_test_common.h | |||
@@ -106,13 +106,13 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx); | |||
106 | enum MHD_Result | 106 | enum MHD_Result |
107 | http_ahc (void *cls, struct MHD_Connection *connection, | 107 | http_ahc (void *cls, struct MHD_Connection *connection, |
108 | const char *url, const char *method, const char *upload_data, | 108 | const char *url, const char *method, const char *upload_data, |
109 | const char *version, size_t *upload_data_size, void **ptr); | 109 | const char *version, size_t *upload_data_size, void **req_cls); |
110 | 110 | ||
111 | enum MHD_Result | 111 | enum MHD_Result |
112 | http_dummy_ahc (void *cls, struct MHD_Connection *connection, | 112 | http_dummy_ahc (void *cls, struct MHD_Connection *connection, |
113 | const char *url, const char *method, const char *upload_data, | 113 | const char *url, const char *method, const char *upload_data, |
114 | const char *version, size_t *upload_data_size, | 114 | const char *version, size_t *upload_data_size, |
115 | void **ptr); | 115 | void **req_cls); |
116 | 116 | ||
117 | 117 | ||
118 | /** | 118 | /** |
diff --git a/src/testcurl/perf_get.c b/src/testcurl/perf_get.c index 9a7e3e08..3ee1c388 100644 --- a/src/testcurl/perf_get.c +++ b/src/testcurl/perf_get.c | |||
@@ -168,7 +168,7 @@ ahc_echo (void *cls, | |||
168 | const char *method, | 168 | const char *method, |
169 | const char *version, | 169 | const char *version, |
170 | const char *upload_data, size_t *upload_data_size, | 170 | const char *upload_data, size_t *upload_data_size, |
171 | void **unused) | 171 | void **req_cls) |
172 | { | 172 | { |
173 | static int ptr; | 173 | static int ptr; |
174 | const char *me = cls; | 174 | const char *me = cls; |
@@ -178,12 +178,12 @@ ahc_echo (void *cls, | |||
178 | 178 | ||
179 | if (0 != strcmp (me, method)) | 179 | if (0 != strcmp (me, method)) |
180 | return MHD_NO; /* unexpected method */ | 180 | return MHD_NO; /* unexpected method */ |
181 | if (&ptr != *unused) | 181 | if (&ptr != *req_cls) |
182 | { | 182 | { |
183 | *unused = &ptr; | 183 | *req_cls = &ptr; |
184 | return MHD_YES; | 184 | return MHD_YES; |
185 | } | 185 | } |
186 | *unused = NULL; | 186 | *req_cls = NULL; |
187 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); | 187 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); |
188 | if (ret == MHD_NO) | 188 | if (ret == MHD_NO) |
189 | abort (); | 189 | abort (); |
diff --git a/src/testcurl/perf_get_concurrent.c b/src/testcurl/perf_get_concurrent.c index 7427ef42..ea282874 100644 --- a/src/testcurl/perf_get_concurrent.c +++ b/src/testcurl/perf_get_concurrent.c | |||
@@ -159,7 +159,7 @@ ahc_echo (void *cls, | |||
159 | const char *method, | 159 | const char *method, |
160 | const char *version, | 160 | const char *version, |
161 | const char *upload_data, size_t *upload_data_size, | 161 | const char *upload_data, size_t *upload_data_size, |
162 | void **unused) | 162 | void **req_cls) |
163 | { | 163 | { |
164 | static int ptr; | 164 | static int ptr; |
165 | const char *me = cls; | 165 | const char *me = cls; |
@@ -169,12 +169,12 @@ ahc_echo (void *cls, | |||
169 | 169 | ||
170 | if (0 != strcmp (me, method)) | 170 | if (0 != strcmp (me, method)) |
171 | return MHD_NO; /* unexpected method */ | 171 | return MHD_NO; /* unexpected method */ |
172 | if (&ptr != *unused) | 172 | if (&ptr != *req_cls) |
173 | { | 173 | { |
174 | *unused = &ptr; | 174 | *req_cls = &ptr; |
175 | return MHD_YES; | 175 | return MHD_YES; |
176 | } | 176 | } |
177 | *unused = NULL; | 177 | *req_cls = NULL; |
178 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); | 178 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); |
179 | if (ret == MHD_NO) | 179 | if (ret == MHD_NO) |
180 | abort (); | 180 | abort (); |
diff --git a/src/testcurl/test_add_conn.c b/src/testcurl/test_add_conn.c index 746ecbaf..811bfba4 100644 --- a/src/testcurl/test_add_conn.c +++ b/src/testcurl/test_add_conn.c | |||
@@ -148,7 +148,7 @@ ahc_echo (void *cls, | |||
148 | const char *method, | 148 | const char *method, |
149 | const char *version, | 149 | const char *version, |
150 | const char *upload_data, size_t *upload_data_size, | 150 | const char *upload_data, size_t *upload_data_size, |
151 | void **unused) | 151 | void **req_cls) |
152 | { | 152 | { |
153 | static int ptr; | 153 | static int ptr; |
154 | const char *me = cls; | 154 | const char *me = cls; |
@@ -161,12 +161,12 @@ ahc_echo (void *cls, | |||
161 | 161 | ||
162 | if (0 != strcmp (me, method)) | 162 | if (0 != strcmp (me, method)) |
163 | return MHD_NO; /* unexpected method */ | 163 | return MHD_NO; /* unexpected method */ |
164 | if (&ptr != *unused) | 164 | if (&ptr != *req_cls) |
165 | { | 165 | { |
166 | *unused = &ptr; | 166 | *req_cls = &ptr; |
167 | return MHD_YES; | 167 | return MHD_YES; |
168 | } | 168 | } |
169 | *unused = NULL; | 169 | *req_cls = NULL; |
170 | v = MHD_lookup_connection_value (connection, | 170 | v = MHD_lookup_connection_value (connection, |
171 | MHD_GET_ARGUMENT_KIND, | 171 | MHD_GET_ARGUMENT_KIND, |
172 | "a"); | 172 | "a"); |
diff --git a/src/testcurl/test_callback.c b/src/testcurl/test_callback.c index 8290851c..8b23ed02 100644 --- a/src/testcurl/test_callback.c +++ b/src/testcurl/test_callback.c | |||
@@ -69,7 +69,7 @@ callback (void *cls, | |||
69 | const char *version, | 69 | const char *version, |
70 | const char *upload_data, | 70 | const char *upload_data, |
71 | size_t *upload_data_size, | 71 | size_t *upload_data_size, |
72 | void **con_cls) | 72 | void **req_cls) |
73 | { | 73 | { |
74 | struct callback_closure *cbc = calloc (1, sizeof(struct callback_closure)); | 74 | struct callback_closure *cbc = calloc (1, sizeof(struct callback_closure)); |
75 | struct MHD_Response *r; | 75 | struct MHD_Response *r; |
@@ -81,7 +81,7 @@ callback (void *cls, | |||
81 | (void) version; | 81 | (void) version; |
82 | (void) upload_data; /* Unused. Silent compiler warning. */ | 82 | (void) upload_data; /* Unused. Silent compiler warning. */ |
83 | (void) upload_data_size; | 83 | (void) upload_data_size; |
84 | (void) con_cls; /* Unused. Silent compiler warning. */ | 84 | (void) req_cls; /* Unused. Silent compiler warning. */ |
85 | 85 | ||
86 | if (NULL == cbc) | 86 | if (NULL == cbc) |
87 | return MHD_NO; | 87 | return MHD_NO; |
diff --git a/src/testcurl/test_concurrent_stop.c b/src/testcurl/test_concurrent_stop.c index ee41ef94..306b2b5b 100644 --- a/src/testcurl/test_concurrent_stop.c +++ b/src/testcurl/test_concurrent_stop.c | |||
@@ -143,7 +143,7 @@ ahc_echo (void *cls, | |||
143 | const char *version, | 143 | const char *version, |
144 | const char *upload_data, | 144 | const char *upload_data, |
145 | size_t *upload_data_size, | 145 | size_t *upload_data_size, |
146 | void **usr_data) | 146 | void **req_cls) |
147 | { | 147 | { |
148 | static int marker; | 148 | static int marker; |
149 | const char *me = cls; | 149 | const char *me = cls; |
@@ -153,12 +153,12 @@ ahc_echo (void *cls, | |||
153 | 153 | ||
154 | if (0 != strcmp (me, method)) | 154 | if (0 != strcmp (me, method)) |
155 | return MHD_NO; /* unexpected method */ | 155 | return MHD_NO; /* unexpected method */ |
156 | if (&marker != *usr_data) | 156 | if (&marker != *req_cls) |
157 | { | 157 | { |
158 | *usr_data = ▮ | 158 | *req_cls = ▮ |
159 | return MHD_YES; | 159 | return MHD_YES; |
160 | } | 160 | } |
161 | *usr_data = NULL; | 161 | *req_cls = NULL; |
162 | ret = MHD_queue_response (connection, | 162 | ret = MHD_queue_response (connection, |
163 | MHD_HTTP_OK, | 163 | MHD_HTTP_OK, |
164 | response); | 164 | response); |
diff --git a/src/testcurl/test_delete.c b/src/testcurl/test_delete.c index 43bd2840..f0e89395 100644 --- a/src/testcurl/test_delete.c +++ b/src/testcurl/test_delete.c | |||
@@ -90,12 +90,12 @@ ahc_echo (void *cls, | |||
90 | const char *method, | 90 | const char *method, |
91 | const char *version, | 91 | const char *version, |
92 | const char *upload_data, size_t *upload_data_size, | 92 | const char *upload_data, size_t *upload_data_size, |
93 | void **unused) | 93 | void **req_cls) |
94 | { | 94 | { |
95 | int *done = cls; | 95 | int *done = cls; |
96 | struct MHD_Response *response; | 96 | struct MHD_Response *response; |
97 | enum MHD_Result ret; | 97 | enum MHD_Result ret; |
98 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ | 98 | (void) version; (void) req_cls; /* Unused. Silent compiler warning. */ |
99 | 99 | ||
100 | if (0 != strcmp ("DELETE", method)) | 100 | if (0 != strcmp ("DELETE", method)) |
101 | return MHD_NO; /* unexpected method */ | 101 | return MHD_NO; /* unexpected method */ |
diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c index 3b2f2501..13c9c826 100644 --- a/src/testcurl/test_digestauth.c +++ b/src/testcurl/test_digestauth.c | |||
@@ -86,7 +86,7 @@ ahc_echo (void *cls, | |||
86 | const char *version, | 86 | const char *version, |
87 | const char *upload_data, | 87 | const char *upload_data, |
88 | size_t *upload_data_size, | 88 | size_t *upload_data_size, |
89 | void **unused) | 89 | void **req_cls) |
90 | { | 90 | { |
91 | struct MHD_Response *response; | 91 | struct MHD_Response *response; |
92 | char *username; | 92 | char *username; |
@@ -96,7 +96,7 @@ ahc_echo (void *cls, | |||
96 | int ret_i; | 96 | int ret_i; |
97 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ | 97 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ |
98 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ | 98 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ |
99 | (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ | 99 | (void) upload_data_size; (void) req_cls; /* Unused. Silent compiler warning. */ |
100 | 100 | ||
101 | username = MHD_digest_auth_get_username (connection); | 101 | username = MHD_digest_auth_get_username (connection); |
102 | if ( (username == NULL) || | 102 | if ( (username == NULL) || |
diff --git a/src/testcurl/test_digestauth_sha256.c b/src/testcurl/test_digestauth_sha256.c index a720c69b..7f8ebcd5 100644 --- a/src/testcurl/test_digestauth_sha256.c +++ b/src/testcurl/test_digestauth_sha256.c | |||
@@ -87,7 +87,7 @@ ahc_echo (void *cls, | |||
87 | const char *version, | 87 | const char *version, |
88 | const char *upload_data, | 88 | const char *upload_data, |
89 | size_t *upload_data_size, | 89 | size_t *upload_data_size, |
90 | void **unused) | 90 | void **req_cls) |
91 | { | 91 | { |
92 | struct MHD_Response *response; | 92 | struct MHD_Response *response; |
93 | char *username; | 93 | char *username; |
@@ -97,7 +97,7 @@ ahc_echo (void *cls, | |||
97 | int ret_i; | 97 | int ret_i; |
98 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ | 98 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ |
99 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ | 99 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ |
100 | (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ | 100 | (void) upload_data_size; (void) req_cls; /* Unused. Silent compiler warning. */ |
101 | 101 | ||
102 | username = MHD_digest_auth_get_username (connection); | 102 | username = MHD_digest_auth_get_username (connection); |
103 | if ( (username == NULL) || | 103 | if ( (username == NULL) || |
diff --git a/src/testcurl/test_digestauth_with_arguments.c b/src/testcurl/test_digestauth_with_arguments.c index 523c9552..ce4b8970 100644 --- a/src/testcurl/test_digestauth_with_arguments.c +++ b/src/testcurl/test_digestauth_with_arguments.c | |||
@@ -80,7 +80,7 @@ ahc_echo (void *cls, | |||
80 | const char *method, | 80 | const char *method, |
81 | const char *version, | 81 | const char *version, |
82 | const char *upload_data, size_t *upload_data_size, | 82 | const char *upload_data, size_t *upload_data_size, |
83 | void **unused) | 83 | void **req_cls) |
84 | { | 84 | { |
85 | struct MHD_Response *response; | 85 | struct MHD_Response *response; |
86 | char *username; | 86 | char *username; |
@@ -90,7 +90,7 @@ ahc_echo (void *cls, | |||
90 | int ret_i; | 90 | int ret_i; |
91 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ | 91 | (void) cls; (void) url; /* Unused. Silent compiler warning. */ |
92 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ | 92 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ |
93 | (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ | 93 | (void) upload_data_size; (void) req_cls; /* Unused. Silent compiler warning. */ |
94 | 94 | ||
95 | username = MHD_digest_auth_get_username (connection); | 95 | username = MHD_digest_auth_get_username (connection); |
96 | if ( (username == NULL) || | 96 | if ( (username == NULL) || |
diff --git a/src/testcurl/test_get.c b/src/testcurl/test_get.c index 58febf7a..a60c0797 100644 --- a/src/testcurl/test_get.c +++ b/src/testcurl/test_get.c | |||
@@ -107,7 +107,7 @@ ahc_echo (void *cls, | |||
107 | const char *method, | 107 | const char *method, |
108 | const char *version, | 108 | const char *version, |
109 | const char *upload_data, size_t *upload_data_size, | 109 | const char *upload_data, size_t *upload_data_size, |
110 | void **unused) | 110 | void **req_cls) |
111 | { | 111 | { |
112 | static int ptr; | 112 | static int ptr; |
113 | const char *me = cls; | 113 | const char *me = cls; |
@@ -120,12 +120,12 @@ ahc_echo (void *cls, | |||
120 | 120 | ||
121 | if (0 != strcmp (me, method)) | 121 | if (0 != strcmp (me, method)) |
122 | return MHD_NO; /* unexpected method */ | 122 | return MHD_NO; /* unexpected method */ |
123 | if (&ptr != *unused) | 123 | if (&ptr != *req_cls) |
124 | { | 124 | { |
125 | *unused = &ptr; | 125 | *req_cls = &ptr; |
126 | return MHD_YES; | 126 | return MHD_YES; |
127 | } | 127 | } |
128 | *unused = NULL; | 128 | *req_cls = NULL; |
129 | v = MHD_lookup_connection_value (connection, | 129 | v = MHD_lookup_connection_value (connection, |
130 | MHD_GET_ARGUMENT_KIND, | 130 | MHD_GET_ARGUMENT_KIND, |
131 | "a"); | 131 | "a"); |
@@ -745,7 +745,7 @@ ahc_empty (void *cls, | |||
745 | const char *version, | 745 | const char *version, |
746 | const char *upload_data, | 746 | const char *upload_data, |
747 | size_t *upload_data_size, | 747 | size_t *upload_data_size, |
748 | void **unused) | 748 | void **req_cls) |
749 | { | 749 | { |
750 | static int ptr; | 750 | static int ptr; |
751 | struct MHD_Response *response; | 751 | struct MHD_Response *response; |
@@ -759,12 +759,12 @@ ahc_empty (void *cls, | |||
759 | 759 | ||
760 | if (0 != strcmp ("GET", method)) | 760 | if (0 != strcmp ("GET", method)) |
761 | return MHD_NO; /* unexpected method */ | 761 | return MHD_NO; /* unexpected method */ |
762 | if (&ptr != *unused) | 762 | if (&ptr != *req_cls) |
763 | { | 763 | { |
764 | *unused = &ptr; | 764 | *req_cls = &ptr; |
765 | return MHD_YES; | 765 | return MHD_YES; |
766 | } | 766 | } |
767 | *unused = NULL; | 767 | *req_cls = NULL; |
768 | response = MHD_create_response_from_buffer (0, | 768 | response = MHD_create_response_from_buffer (0, |
769 | NULL, | 769 | NULL, |
770 | MHD_RESPMEM_PERSISTENT); | 770 | MHD_RESPMEM_PERSISTENT); |
diff --git a/src/testcurl/test_get_chunked.c b/src/testcurl/test_get_chunked.c index 5a19a24e..876016cc 100644 --- a/src/testcurl/test_get_chunked.c +++ b/src/testcurl/test_get_chunked.c | |||
@@ -180,7 +180,7 @@ ahc_echo (void *cls, | |||
180 | const char *url, | 180 | const char *url, |
181 | const char *method, | 181 | const char *method, |
182 | const char *version, | 182 | const char *version, |
183 | const char *upload_data, size_t *upload_data_size, void **ptr) | 183 | const char *upload_data, size_t *upload_data_size, void **req_cls) |
184 | { | 184 | { |
185 | static int aptr; | 185 | static int aptr; |
186 | const char *me = cls; | 186 | const char *me = cls; |
@@ -194,10 +194,10 @@ ahc_echo (void *cls, | |||
194 | 194 | ||
195 | if (0 != strcmp (me, method)) | 195 | if (0 != strcmp (me, method)) |
196 | return MHD_NO; /* unexpected method */ | 196 | return MHD_NO; /* unexpected method */ |
197 | if (&aptr != *ptr) | 197 | if (&aptr != *req_cls) |
198 | { | 198 | { |
199 | /* do never respond on first call */ | 199 | /* do never respond on first call */ |
200 | *ptr = &aptr; | 200 | *req_cls = &aptr; |
201 | return MHD_YES; | 201 | return MHD_YES; |
202 | } | 202 | } |
203 | if (! resp_string) | 203 | if (! resp_string) |
diff --git a/src/testcurl/test_get_close_keep_alive.c b/src/testcurl/test_get_close_keep_alive.c index 2fca0ce3..1cb46e68 100644 --- a/src/testcurl/test_get_close_keep_alive.c +++ b/src/testcurl/test_get_close_keep_alive.c | |||
@@ -312,7 +312,7 @@ ahc_echo (void *cls, | |||
312 | const char *method, | 312 | const char *method, |
313 | const char *version, | 313 | const char *version, |
314 | const char *upload_data, size_t *upload_data_size, | 314 | const char *upload_data, size_t *upload_data_size, |
315 | void **unused) | 315 | void **req_cls) |
316 | { | 316 | { |
317 | static int ptr; | 317 | static int ptr; |
318 | const char *me = cls; | 318 | const char *me = cls; |
@@ -324,12 +324,12 @@ ahc_echo (void *cls, | |||
324 | 324 | ||
325 | if (0 != strcmp (me, method)) | 325 | if (0 != strcmp (me, method)) |
326 | return MHD_NO; /* unexpected method */ | 326 | return MHD_NO; /* unexpected method */ |
327 | if (&ptr != *unused) | 327 | if (&ptr != *req_cls) |
328 | { | 328 | { |
329 | *unused = &ptr; | 329 | *req_cls = &ptr; |
330 | return MHD_YES; | 330 | return MHD_YES; |
331 | } | 331 | } |
332 | *unused = NULL; | 332 | *req_cls = NULL; |
333 | if (slow_reply) | 333 | if (slow_reply) |
334 | usleep (200000); | 334 | usleep (200000); |
335 | 335 | ||
diff --git a/src/testcurl/test_get_empty.c b/src/testcurl/test_get_empty.c index 5ed71ab9..fdbb2d42 100644 --- a/src/testcurl/test_get_empty.c +++ b/src/testcurl/test_get_empty.c | |||
@@ -107,7 +107,7 @@ ahc_echo (void *cls, | |||
107 | const char *method, | 107 | const char *method, |
108 | const char *version, | 108 | const char *version, |
109 | const char *upload_data, size_t *upload_data_size, | 109 | const char *upload_data, size_t *upload_data_size, |
110 | void **unused) | 110 | void **req_cls) |
111 | { | 111 | { |
112 | static int ptr; | 112 | static int ptr; |
113 | const char *me = cls; | 113 | const char *me = cls; |
@@ -119,12 +119,12 @@ ahc_echo (void *cls, | |||
119 | 119 | ||
120 | if (0 != strcmp (me, method)) | 120 | if (0 != strcmp (me, method)) |
121 | return MHD_NO; /* unexpected method */ | 121 | return MHD_NO; /* unexpected method */ |
122 | if (&ptr != *unused) | 122 | if (&ptr != *req_cls) |
123 | { | 123 | { |
124 | *unused = &ptr; | 124 | *req_cls = &ptr; |
125 | return MHD_YES; | 125 | return MHD_YES; |
126 | } | 126 | } |
127 | *unused = NULL; | 127 | *req_cls = NULL; |
128 | response = MHD_create_response_from_buffer (0, | 128 | response = MHD_create_response_from_buffer (0, |
129 | NULL, | 129 | NULL, |
130 | MHD_RESPMEM_PERSISTENT); | 130 | MHD_RESPMEM_PERSISTENT); |
@@ -703,7 +703,7 @@ ahc_empty (void *cls, | |||
703 | const char *method, | 703 | const char *method, |
704 | const char *version, | 704 | const char *version, |
705 | const char *upload_data, size_t *upload_data_size, | 705 | const char *upload_data, size_t *upload_data_size, |
706 | void **unused) | 706 | void **req_cls) |
707 | { | 707 | { |
708 | static int ptr; | 708 | static int ptr; |
709 | struct MHD_Response *response; | 709 | struct MHD_Response *response; |
@@ -717,12 +717,12 @@ ahc_empty (void *cls, | |||
717 | 717 | ||
718 | if (0 != strcmp ("GET", method)) | 718 | if (0 != strcmp ("GET", method)) |
719 | return MHD_NO; /* unexpected method */ | 719 | return MHD_NO; /* unexpected method */ |
720 | if (&ptr != *unused) | 720 | if (&ptr != *req_cls) |
721 | { | 721 | { |
722 | *unused = &ptr; | 722 | *req_cls = &ptr; |
723 | return MHD_YES; | 723 | return MHD_YES; |
724 | } | 724 | } |
725 | *unused = NULL; | 725 | *req_cls = NULL; |
726 | response = MHD_create_response_from_buffer (0, | 726 | response = MHD_create_response_from_buffer (0, |
727 | NULL, | 727 | NULL, |
728 | MHD_RESPMEM_PERSISTENT); | 728 | MHD_RESPMEM_PERSISTENT); |
diff --git a/src/testcurl/test_get_iovec.c b/src/testcurl/test_get_iovec.c index ae30f6d6..bcb610dc 100644 --- a/src/testcurl/test_get_iovec.c +++ b/src/testcurl/test_get_iovec.c | |||
@@ -132,7 +132,7 @@ ahc_echo (void *cls, | |||
132 | const char *method, | 132 | const char *method, |
133 | const char *version, | 133 | const char *version, |
134 | const char *upload_data, size_t *upload_data_size, | 134 | const char *upload_data, size_t *upload_data_size, |
135 | void **unused) | 135 | void **req_cls) |
136 | { | 136 | { |
137 | static int ptr; | 137 | static int ptr; |
138 | const char *me = cls; | 138 | const char *me = cls; |
@@ -146,12 +146,12 @@ ahc_echo (void *cls, | |||
146 | 146 | ||
147 | if (0 != strcmp (me, method)) | 147 | if (0 != strcmp (me, method)) |
148 | return MHD_NO; /* unexpected method */ | 148 | return MHD_NO; /* unexpected method */ |
149 | if (&ptr != *unused) | 149 | if (&ptr != *req_cls) |
150 | { | 150 | { |
151 | *unused = &ptr; | 151 | *req_cls = &ptr; |
152 | return MHD_YES; | 152 | return MHD_YES; |
153 | } | 153 | } |
154 | *unused = NULL; | 154 | *req_cls = NULL; |
155 | 155 | ||
156 | /* Create some test data. */ | 156 | /* Create some test data. */ |
157 | if (NULL == (data = malloc (TESTSTR_SIZE))) | 157 | if (NULL == (data = malloc (TESTSTR_SIZE))) |
@@ -188,7 +188,7 @@ ncont_echo (void *cls, | |||
188 | const char *method, | 188 | const char *method, |
189 | const char *version, | 189 | const char *version, |
190 | const char *upload_data, size_t *upload_data_size, | 190 | const char *upload_data, size_t *upload_data_size, |
191 | void **unused) | 191 | void **req_cls) |
192 | { | 192 | { |
193 | static int ptr; | 193 | static int ptr; |
194 | const char *me = cls; | 194 | const char *me = cls; |
@@ -202,12 +202,12 @@ ncont_echo (void *cls, | |||
202 | 202 | ||
203 | if (0 != strcmp (me, method)) | 203 | if (0 != strcmp (me, method)) |
204 | return MHD_NO; /* unexpected method */ | 204 | return MHD_NO; /* unexpected method */ |
205 | if (&ptr != *unused) | 205 | if (&ptr != *req_cls) |
206 | { | 206 | { |
207 | *unused = &ptr; | 207 | *req_cls = &ptr; |
208 | return MHD_YES; | 208 | return MHD_YES; |
209 | } | 209 | } |
210 | *unused = NULL; | 210 | *req_cls = NULL; |
211 | 211 | ||
212 | if (NULL == (iov = malloc (sizeof(struct MHD_IoVec) * TESTSTR_IOVCNT))) | 212 | if (NULL == (iov = malloc (sizeof(struct MHD_IoVec) * TESTSTR_IOVCNT))) |
213 | return MHD_NO; | 213 | return MHD_NO; |
diff --git a/src/testcurl/test_get_response_cleanup.c b/src/testcurl/test_get_response_cleanup.c index efec5144..ededc88b 100644 --- a/src/testcurl/test_get_response_cleanup.c +++ b/src/testcurl/test_get_response_cleanup.c | |||
@@ -122,7 +122,7 @@ ahc_echo (void *cls, | |||
122 | const char *method, | 122 | const char *method, |
123 | const char *version, | 123 | const char *version, |
124 | const char *upload_data, size_t *upload_data_size, | 124 | const char *upload_data, size_t *upload_data_size, |
125 | void **unused) | 125 | void **req_cls) |
126 | { | 126 | { |
127 | static int ptr; | 127 | static int ptr; |
128 | const char *me = cls; | 128 | const char *me = cls; |
@@ -134,12 +134,12 @@ ahc_echo (void *cls, | |||
134 | // fprintf (stderr, "In CB: %s!\n", method); | 134 | // fprintf (stderr, "In CB: %s!\n", method); |
135 | if (0 != strcmp (me, method)) | 135 | if (0 != strcmp (me, method)) |
136 | return MHD_NO; /* unexpected method */ | 136 | return MHD_NO; /* unexpected method */ |
137 | if (&ptr != *unused) | 137 | if (&ptr != *req_cls) |
138 | { | 138 | { |
139 | *unused = &ptr; | 139 | *req_cls = &ptr; |
140 | return MHD_YES; | 140 | return MHD_YES; |
141 | } | 141 | } |
142 | *unused = NULL; | 142 | *req_cls = NULL; |
143 | response = MHD_create_response_from_callback (MHD_SIZE_UNKNOWN, | 143 | response = MHD_create_response_from_callback (MHD_SIZE_UNKNOWN, |
144 | 32 * 1024, | 144 | 32 * 1024, |
145 | &push_callback, | 145 | &push_callback, |
diff --git a/src/testcurl/test_get_sendfile.c b/src/testcurl/test_get_sendfile.c index 84929d81..4ca57e23 100644 --- a/src/testcurl/test_get_sendfile.c +++ b/src/testcurl/test_get_sendfile.c | |||
@@ -84,7 +84,7 @@ ahc_echo (void *cls, | |||
84 | const char *method, | 84 | const char *method, |
85 | const char *version, | 85 | const char *version, |
86 | const char *upload_data, size_t *upload_data_size, | 86 | const char *upload_data, size_t *upload_data_size, |
87 | void **unused) | 87 | void **req_cls) |
88 | { | 88 | { |
89 | static int ptr; | 89 | static int ptr; |
90 | const char *me = cls; | 90 | const char *me = cls; |
@@ -96,12 +96,12 @@ ahc_echo (void *cls, | |||
96 | 96 | ||
97 | if (0 != strcmp (me, method)) | 97 | if (0 != strcmp (me, method)) |
98 | return MHD_NO; /* unexpected method */ | 98 | return MHD_NO; /* unexpected method */ |
99 | if (&ptr != *unused) | 99 | if (&ptr != *req_cls) |
100 | { | 100 | { |
101 | *unused = &ptr; | 101 | *req_cls = &ptr; |
102 | return MHD_YES; | 102 | return MHD_YES; |
103 | } | 103 | } |
104 | *unused = NULL; | 104 | *req_cls = NULL; |
105 | fd = open (sourcefile, O_RDONLY); | 105 | fd = open (sourcefile, O_RDONLY); |
106 | if (fd == -1) | 106 | if (fd == -1) |
107 | { | 107 | { |
diff --git a/src/testcurl/test_get_wait.c b/src/testcurl/test_get_wait.c index 40fcaf6d..708c82bd 100644 --- a/src/testcurl/test_get_wait.c +++ b/src/testcurl/test_get_wait.c | |||
@@ -86,7 +86,7 @@ ahc_echo (void *cls, | |||
86 | const char *method, | 86 | const char *method, |
87 | const char *version, | 87 | const char *version, |
88 | const char *upload_data, size_t *upload_data_size, | 88 | const char *upload_data, size_t *upload_data_size, |
89 | void **unused) | 89 | void **req_cls) |
90 | { | 90 | { |
91 | static int ptr; | 91 | static int ptr; |
92 | const char *me = cls; | 92 | const char *me = cls; |
@@ -96,12 +96,12 @@ ahc_echo (void *cls, | |||
96 | 96 | ||
97 | if (0 != strcmp (me, method)) | 97 | if (0 != strcmp (me, method)) |
98 | return MHD_NO; /* unexpected method */ | 98 | return MHD_NO; /* unexpected method */ |
99 | if (&ptr != *unused) | 99 | if (&ptr != *req_cls) |
100 | { | 100 | { |
101 | *unused = &ptr; | 101 | *req_cls = &ptr; |
102 | return MHD_YES; | 102 | return MHD_YES; |
103 | } | 103 | } |
104 | *unused = NULL; | 104 | *req_cls = NULL; |
105 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); | 105 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); |
106 | if (ret == MHD_NO) | 106 | if (ret == MHD_NO) |
107 | abort (); | 107 | abort (); |
diff --git a/src/testcurl/test_iplimit.c b/src/testcurl/test_iplimit.c index 09fe7773..509e3955 100644 --- a/src/testcurl/test_iplimit.c +++ b/src/testcurl/test_iplimit.c | |||
@@ -82,7 +82,7 @@ ahc_echo (void *cls, | |||
82 | const char *method, | 82 | const char *method, |
83 | const char *version, | 83 | const char *version, |
84 | const char *upload_data, size_t *upload_data_size, | 84 | const char *upload_data, size_t *upload_data_size, |
85 | void **unused) | 85 | void **req_cls) |
86 | { | 86 | { |
87 | static int ptr; | 87 | static int ptr; |
88 | const char *me = cls; | 88 | const char *me = cls; |
@@ -92,12 +92,12 @@ ahc_echo (void *cls, | |||
92 | 92 | ||
93 | if (0 != strcmp (me, method)) | 93 | if (0 != strcmp (me, method)) |
94 | return MHD_NO; /* unexpected method */ | 94 | return MHD_NO; /* unexpected method */ |
95 | if (&ptr != *unused) | 95 | if (&ptr != *req_cls) |
96 | { | 96 | { |
97 | *unused = &ptr; | 97 | *req_cls = &ptr; |
98 | return MHD_YES; | 98 | return MHD_YES; |
99 | } | 99 | } |
100 | *unused = NULL; | 100 | *req_cls = NULL; |
101 | response = MHD_create_response_from_buffer (strlen (url), | 101 | response = MHD_create_response_from_buffer (strlen (url), |
102 | (void *) url, | 102 | (void *) url, |
103 | MHD_RESPMEM_MUST_COPY); | 103 | MHD_RESPMEM_MUST_COPY); |
diff --git a/src/testcurl/test_large_put.c b/src/testcurl/test_large_put.c index b00d0e1a..161e0f0b 100644 --- a/src/testcurl/test_large_put.c +++ b/src/testcurl/test_large_put.c | |||
@@ -233,7 +233,7 @@ ahc_echo (void *cls, | |||
233 | const char *method, | 233 | const char *method, |
234 | const char *version, | 234 | const char *version, |
235 | const char *upload_data, size_t *upload_data_size, | 235 | const char *upload_data, size_t *upload_data_size, |
236 | void **pparam) | 236 | void **req_cls) |
237 | { | 237 | { |
238 | int *done = cls; | 238 | int *done = cls; |
239 | struct MHD_Response *response; | 239 | struct MHD_Response *response; |
@@ -259,13 +259,13 @@ ahc_echo (void *cls, | |||
259 | if ((*done) == 0) | 259 | if ((*done) == 0) |
260 | { | 260 | { |
261 | size_t *pproc; | 261 | size_t *pproc; |
262 | if (NULL == *pparam) | 262 | if (NULL == *req_cls) |
263 | { | 263 | { |
264 | processed = 0; | 264 | processed = 0; |
265 | /* Safe as long as only one parallel request served. */ | 265 | /* Safe as long as only one parallel request served. */ |
266 | *pparam = &processed; | 266 | *req_cls = &processed; |
267 | } | 267 | } |
268 | pproc = (size_t *) *pparam; | 268 | pproc = (size_t *) *req_cls; |
269 | 269 | ||
270 | if (0 == *upload_data_size) | 270 | if (0 == *upload_data_size) |
271 | return MHD_YES; /* No data to process. */ | 271 | return MHD_YES; /* No data to process. */ |
diff --git a/src/testcurl/test_long_header.c b/src/testcurl/test_long_header.c index b76ea90d..329c3955 100644 --- a/src/testcurl/test_long_header.c +++ b/src/testcurl/test_long_header.c | |||
@@ -78,13 +78,13 @@ ahc_echo (void *cls, | |||
78 | const char *method, | 78 | const char *method, |
79 | const char *version, | 79 | const char *version, |
80 | const char *upload_data, size_t *upload_data_size, | 80 | const char *upload_data, size_t *upload_data_size, |
81 | void **unused) | 81 | void **req_cls) |
82 | { | 82 | { |
83 | const char *me = cls; | 83 | const char *me = cls; |
84 | struct MHD_Response *response; | 84 | struct MHD_Response *response; |
85 | enum MHD_Result ret; | 85 | enum MHD_Result ret; |
86 | (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ | 86 | (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ |
87 | (void) upload_data_size; (void) unused; /* Unused. Silent compiler warning. */ | 87 | (void) upload_data_size; (void) req_cls; /* Unused. Silent compiler warning. */ |
88 | 88 | ||
89 | if (0 != strcmp (me, method)) | 89 | if (0 != strcmp (me, method)) |
90 | return MHD_NO; /* unexpected method */ | 90 | return MHD_NO; /* unexpected method */ |
diff --git a/src/testcurl/test_parse_cookies.c b/src/testcurl/test_parse_cookies.c index 07c67567..0fc5ffc1 100644 --- a/src/testcurl/test_parse_cookies.c +++ b/src/testcurl/test_parse_cookies.c | |||
@@ -68,7 +68,7 @@ ahc_echo (void *cls, | |||
68 | const char *method, | 68 | const char *method, |
69 | const char *version, | 69 | const char *version, |
70 | const char *upload_data, size_t *upload_data_size, | 70 | const char *upload_data, size_t *upload_data_size, |
71 | void **unused) | 71 | void **req_cls) |
72 | { | 72 | { |
73 | static int ptr; | 73 | static int ptr; |
74 | const char *me = cls; | 74 | const char *me = cls; |
@@ -79,12 +79,12 @@ ahc_echo (void *cls, | |||
79 | 79 | ||
80 | if (0 != strcmp (me, method)) | 80 | if (0 != strcmp (me, method)) |
81 | return MHD_NO; /* unexpected method */ | 81 | return MHD_NO; /* unexpected method */ |
82 | if (&ptr != *unused) | 82 | if (&ptr != *req_cls) |
83 | { | 83 | { |
84 | *unused = &ptr; | 84 | *req_cls = &ptr; |
85 | return MHD_YES; | 85 | return MHD_YES; |
86 | } | 86 | } |
87 | *unused = NULL; | 87 | *req_cls = NULL; |
88 | 88 | ||
89 | hdr = MHD_lookup_connection_value (connection, MHD_COOKIE_KIND, "name1"); | 89 | hdr = MHD_lookup_connection_value (connection, MHD_COOKIE_KIND, "name1"); |
90 | if ((hdr == NULL) || (0 != strcmp (hdr, "var1"))) | 90 | if ((hdr == NULL) || (0 != strcmp (hdr, "var1"))) |
diff --git a/src/testcurl/test_patch.c b/src/testcurl/test_patch.c index f443ad08..100242a5 100644 --- a/src/testcurl/test_patch.c +++ b/src/testcurl/test_patch.c | |||
@@ -90,12 +90,12 @@ ahc_echo (void *cls, | |||
90 | const char *method, | 90 | const char *method, |
91 | const char *version, | 91 | const char *version, |
92 | const char *upload_data, size_t *upload_data_size, | 92 | const char *upload_data, size_t *upload_data_size, |
93 | void **unused) | 93 | void **req_cls) |
94 | { | 94 | { |
95 | int *done = cls; | 95 | int *done = cls; |
96 | struct MHD_Response *response; | 96 | struct MHD_Response *response; |
97 | enum MHD_Result ret; | 97 | enum MHD_Result ret; |
98 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ | 98 | (void) version; (void) req_cls; /* Unused. Silent compiler warning. */ |
99 | 99 | ||
100 | if (0 != strcmp ("PATCH", method)) | 100 | if (0 != strcmp ("PATCH", method)) |
101 | return MHD_NO; /* unexpected method */ | 101 | return MHD_NO; /* unexpected method */ |
diff --git a/src/testcurl/test_post.c b/src/testcurl/test_post.c index 1bf9be70..90b8f48a 100644 --- a/src/testcurl/test_post.c +++ b/src/testcurl/test_post.c | |||
@@ -69,15 +69,15 @@ struct CBC | |||
69 | static void | 69 | static void |
70 | completed_cb (void *cls, | 70 | completed_cb (void *cls, |
71 | struct MHD_Connection *connection, | 71 | struct MHD_Connection *connection, |
72 | void **con_cls, | 72 | void **req_cls, |
73 | enum MHD_RequestTerminationCode toe) | 73 | enum MHD_RequestTerminationCode toe) |
74 | { | 74 | { |
75 | struct MHD_PostProcessor *pp = *con_cls; | 75 | struct MHD_PostProcessor *pp = *req_cls; |
76 | (void) cls; (void) connection; (void) toe; /* Unused. Silent compiler warning. */ | 76 | (void) cls; (void) connection; (void) toe; /* Unused. Silent compiler warning. */ |
77 | 77 | ||
78 | if (NULL != pp) | 78 | if (NULL != pp) |
79 | MHD_destroy_post_processor (pp); | 79 | MHD_destroy_post_processor (pp); |
80 | *con_cls = NULL; | 80 | *req_cls = NULL; |
81 | } | 81 | } |
82 | 82 | ||
83 | 83 | ||
@@ -129,7 +129,7 @@ ahc_echo (void *cls, | |||
129 | const char *method, | 129 | const char *method, |
130 | const char *version, | 130 | const char *version, |
131 | const char *upload_data, size_t *upload_data_size, | 131 | const char *upload_data, size_t *upload_data_size, |
132 | void **unused) | 132 | void **req_cls) |
133 | { | 133 | { |
134 | static int eok; | 134 | static int eok; |
135 | struct MHD_Response *response; | 135 | struct MHD_Response *response; |
@@ -142,12 +142,12 @@ ahc_echo (void *cls, | |||
142 | printf ("METHOD: %s\n", method); | 142 | printf ("METHOD: %s\n", method); |
143 | return MHD_NO; /* unexpected method */ | 143 | return MHD_NO; /* unexpected method */ |
144 | } | 144 | } |
145 | pp = *unused; | 145 | pp = *req_cls; |
146 | if (pp == NULL) | 146 | if (pp == NULL) |
147 | { | 147 | { |
148 | eok = 0; | 148 | eok = 0; |
149 | pp = MHD_create_post_processor (connection, 1024, &post_iterator, &eok); | 149 | pp = MHD_create_post_processor (connection, 1024, &post_iterator, &eok); |
150 | *unused = pp; | 150 | *req_cls = pp; |
151 | } | 151 | } |
152 | MHD_post_process (pp, upload_data, *upload_data_size); | 152 | MHD_post_process (pp, upload_data, *upload_data_size); |
153 | if ((eok == 3) && (0 == *upload_data_size)) | 153 | if ((eok == 3) && (0 == *upload_data_size)) |
@@ -158,7 +158,7 @@ ahc_echo (void *cls, | |||
158 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); | 158 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); |
159 | MHD_destroy_response (response); | 159 | MHD_destroy_response (response); |
160 | MHD_destroy_post_processor (pp); | 160 | MHD_destroy_post_processor (pp); |
161 | *unused = NULL; | 161 | *req_cls = NULL; |
162 | return ret; | 162 | return ret; |
163 | } | 163 | } |
164 | *upload_data_size = 0; | 164 | *upload_data_size = 0; |
@@ -592,7 +592,7 @@ ahc_cancel (void *cls, | |||
592 | const char *method, | 592 | const char *method, |
593 | const char *version, | 593 | const char *version, |
594 | const char *upload_data, size_t *upload_data_size, | 594 | const char *upload_data, size_t *upload_data_size, |
595 | void **unused) | 595 | void **req_cls) |
596 | { | 596 | { |
597 | struct MHD_Response *response; | 597 | struct MHD_Response *response; |
598 | enum MHD_Result ret; | 598 | enum MHD_Result ret; |
@@ -606,9 +606,9 @@ ahc_cancel (void *cls, | |||
606 | return MHD_NO; | 606 | return MHD_NO; |
607 | } | 607 | } |
608 | 608 | ||
609 | if (*unused == NULL) | 609 | if (*req_cls == NULL) |
610 | { | 610 | { |
611 | *unused = "wibble"; | 611 | *req_cls = "wibble"; |
612 | /* We don't want the body. Send a 500. */ | 612 | /* We don't want the body. Send a 500. */ |
613 | response = MHD_create_response_from_buffer (0, NULL, | 613 | response = MHD_create_response_from_buffer (0, NULL, |
614 | MHD_RESPMEM_PERSISTENT); | 614 | MHD_RESPMEM_PERSISTENT); |
diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c index ec929904..c36fba7f 100644 --- a/src/testcurl/test_post_loop.c +++ b/src/testcurl/test_post_loop.c | |||
@@ -86,7 +86,7 @@ ahc_echo (void *cls, | |||
86 | const char *method, | 86 | const char *method, |
87 | const char *version, | 87 | const char *version, |
88 | const char *upload_data, size_t *upload_data_size, | 88 | const char *upload_data, size_t *upload_data_size, |
89 | void **mptr) | 89 | void **req_cls) |
90 | { | 90 | { |
91 | static int marker; | 91 | static int marker; |
92 | struct MHD_Response *response; | 92 | struct MHD_Response *response; |
@@ -99,21 +99,21 @@ ahc_echo (void *cls, | |||
99 | printf ("METHOD: %s\n", method); | 99 | printf ("METHOD: %s\n", method); |
100 | return MHD_NO; /* unexpected method */ | 100 | return MHD_NO; /* unexpected method */ |
101 | } | 101 | } |
102 | if ((*mptr != NULL) && (0 == *upload_data_size)) | 102 | if ((*req_cls != NULL) && (0 == *upload_data_size)) |
103 | { | 103 | { |
104 | if (*mptr != &marker) | 104 | if (*req_cls != &marker) |
105 | abort (); | 105 | abort (); |
106 | response = MHD_create_response_from_buffer (2, "OK", | 106 | response = MHD_create_response_from_buffer (2, "OK", |
107 | MHD_RESPMEM_PERSISTENT); | 107 | MHD_RESPMEM_PERSISTENT); |
108 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); | 108 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); |
109 | MHD_destroy_response (response); | 109 | MHD_destroy_response (response); |
110 | *mptr = NULL; | 110 | *req_cls = NULL; |
111 | return ret; | 111 | return ret; |
112 | } | 112 | } |
113 | if (strlen (POST_DATA) != *upload_data_size) | 113 | if (strlen (POST_DATA) != *upload_data_size) |
114 | return MHD_YES; | 114 | return MHD_YES; |
115 | *upload_data_size = 0; | 115 | *upload_data_size = 0; |
116 | *mptr = ▮ | 116 | *req_cls = ▮ |
117 | return MHD_YES; | 117 | return MHD_YES; |
118 | } | 118 | } |
119 | 119 | ||
diff --git a/src/testcurl/test_postform.c b/src/testcurl/test_postform.c index 1f60fb06..87febcbc 100644 --- a/src/testcurl/test_postform.c +++ b/src/testcurl/test_postform.c | |||
@@ -65,15 +65,15 @@ struct CBC | |||
65 | static void | 65 | static void |
66 | completed_cb (void *cls, | 66 | completed_cb (void *cls, |
67 | struct MHD_Connection *connection, | 67 | struct MHD_Connection *connection, |
68 | void **con_cls, | 68 | void **req_cls, |
69 | enum MHD_RequestTerminationCode toe) | 69 | enum MHD_RequestTerminationCode toe) |
70 | { | 70 | { |
71 | struct MHD_PostProcessor *pp = *con_cls; | 71 | struct MHD_PostProcessor *pp = *req_cls; |
72 | (void) cls; (void) connection; (void) toe; /* Unused. Silent compiler warning. */ | 72 | (void) cls; (void) connection; (void) toe; /* Unused. Silent compiler warning. */ |
73 | 73 | ||
74 | if (NULL != pp) | 74 | if (NULL != pp) |
75 | MHD_destroy_post_processor (pp); | 75 | MHD_destroy_post_processor (pp); |
76 | *con_cls = NULL; | 76 | *req_cls = NULL; |
77 | } | 77 | } |
78 | 78 | ||
79 | 79 | ||
@@ -128,7 +128,7 @@ ahc_echo (void *cls, | |||
128 | const char *method, | 128 | const char *method, |
129 | const char *version, | 129 | const char *version, |
130 | const char *upload_data, size_t *upload_data_size, | 130 | const char *upload_data, size_t *upload_data_size, |
131 | void **unused) | 131 | void **req_cls) |
132 | { | 132 | { |
133 | static int eok; | 133 | static int eok; |
134 | struct MHD_Response *response; | 134 | struct MHD_Response *response; |
@@ -141,14 +141,14 @@ ahc_echo (void *cls, | |||
141 | printf ("METHOD: %s\n", method); | 141 | printf ("METHOD: %s\n", method); |
142 | return MHD_NO; /* unexpected method */ | 142 | return MHD_NO; /* unexpected method */ |
143 | } | 143 | } |
144 | pp = *unused; | 144 | pp = *req_cls; |
145 | if (pp == NULL) | 145 | if (pp == NULL) |
146 | { | 146 | { |
147 | eok = 0; | 147 | eok = 0; |
148 | pp = MHD_create_post_processor (connection, 1024, &post_iterator, &eok); | 148 | pp = MHD_create_post_processor (connection, 1024, &post_iterator, &eok); |
149 | if (pp == NULL) | 149 | if (pp == NULL) |
150 | abort (); | 150 | abort (); |
151 | *unused = pp; | 151 | *req_cls = pp; |
152 | } | 152 | } |
153 | MHD_post_process (pp, upload_data, *upload_data_size); | 153 | MHD_post_process (pp, upload_data, *upload_data_size); |
154 | if ((eok == 3) && (0 == *upload_data_size)) | 154 | if ((eok == 3) && (0 == *upload_data_size)) |
@@ -159,7 +159,7 @@ ahc_echo (void *cls, | |||
159 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); | 159 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); |
160 | MHD_destroy_response (response); | 160 | MHD_destroy_response (response); |
161 | MHD_destroy_post_processor (pp); | 161 | MHD_destroy_post_processor (pp); |
162 | *unused = NULL; | 162 | *req_cls = NULL; |
163 | return ret; | 163 | return ret; |
164 | } | 164 | } |
165 | *upload_data_size = 0; | 165 | *upload_data_size = 0; |
diff --git a/src/testcurl/test_process_arguments.c b/src/testcurl/test_process_arguments.c index aaf9681e..24d5e72f 100644 --- a/src/testcurl/test_process_arguments.c +++ b/src/testcurl/test_process_arguments.c | |||
@@ -69,7 +69,7 @@ ahc_echo (void *cls, | |||
69 | const char *method, | 69 | const char *method, |
70 | const char *version, | 70 | const char *version, |
71 | const char *upload_data, size_t *upload_data_size, | 71 | const char *upload_data, size_t *upload_data_size, |
72 | void **unused) | 72 | void **req_cls) |
73 | { | 73 | { |
74 | static int ptr; | 74 | static int ptr; |
75 | const char *me = cls; | 75 | const char *me = cls; |
@@ -80,12 +80,12 @@ ahc_echo (void *cls, | |||
80 | 80 | ||
81 | if (0 != strcmp (me, method)) | 81 | if (0 != strcmp (me, method)) |
82 | return MHD_NO; /* unexpected method */ | 82 | return MHD_NO; /* unexpected method */ |
83 | if (&ptr != *unused) | 83 | if (&ptr != *req_cls) |
84 | { | 84 | { |
85 | *unused = &ptr; | 85 | *req_cls = &ptr; |
86 | return MHD_YES; | 86 | return MHD_YES; |
87 | } | 87 | } |
88 | *unused = NULL; | 88 | *req_cls = NULL; |
89 | hdr = MHD_lookup_connection_value (connection, MHD_GET_ARGUMENT_KIND, "k"); | 89 | hdr = MHD_lookup_connection_value (connection, MHD_GET_ARGUMENT_KIND, "k"); |
90 | if ((hdr == NULL) || (0 != strcmp (hdr, "v x"))) | 90 | if ((hdr == NULL) || (0 != strcmp (hdr, "v x"))) |
91 | abort (); | 91 | abort (); |
diff --git a/src/testcurl/test_process_headers.c b/src/testcurl/test_process_headers.c index 9a84b3ef..98b08fbc 100644 --- a/src/testcurl/test_process_headers.c +++ b/src/testcurl/test_process_headers.c | |||
@@ -89,7 +89,7 @@ ahc_echo (void *cls, | |||
89 | const char *method, | 89 | const char *method, |
90 | const char *version, | 90 | const char *version, |
91 | const char *upload_data, size_t *upload_data_size, | 91 | const char *upload_data, size_t *upload_data_size, |
92 | void **unused) | 92 | void **req_cls) |
93 | { | 93 | { |
94 | static int ptr; | 94 | static int ptr; |
95 | const char *me = cls; | 95 | const char *me = cls; |
@@ -100,12 +100,12 @@ ahc_echo (void *cls, | |||
100 | 100 | ||
101 | if (0 != strcmp (me, method)) | 101 | if (0 != strcmp (me, method)) |
102 | return MHD_NO; /* unexpected method */ | 102 | return MHD_NO; /* unexpected method */ |
103 | if (&ptr != *unused) | 103 | if (&ptr != *req_cls) |
104 | { | 104 | { |
105 | *unused = &ptr; | 105 | *req_cls = &ptr; |
106 | return MHD_YES; | 106 | return MHD_YES; |
107 | } | 107 | } |
108 | *unused = NULL; | 108 | *req_cls = NULL; |
109 | ret = 0; | 109 | ret = 0; |
110 | MHD_get_connection_values (connection, MHD_HEADER_KIND, &kv_cb, &ret); | 110 | MHD_get_connection_values (connection, MHD_HEADER_KIND, &kv_cb, &ret); |
111 | if (ret != 1) | 111 | if (ret != 1) |
diff --git a/src/testcurl/test_put.c b/src/testcurl/test_put.c index f572a9a8..761e1c5f 100644 --- a/src/testcurl/test_put.c +++ b/src/testcurl/test_put.c | |||
@@ -90,12 +90,12 @@ ahc_echo (void *cls, | |||
90 | const char *method, | 90 | const char *method, |
91 | const char *version, | 91 | const char *version, |
92 | const char *upload_data, size_t *upload_data_size, | 92 | const char *upload_data, size_t *upload_data_size, |
93 | void **unused) | 93 | void **req_cls) |
94 | { | 94 | { |
95 | int *done = cls; | 95 | int *done = cls; |
96 | struct MHD_Response *response; | 96 | struct MHD_Response *response; |
97 | enum MHD_Result ret; | 97 | enum MHD_Result ret; |
98 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ | 98 | (void) version; (void) req_cls; /* Unused. Silent compiler warning. */ |
99 | 99 | ||
100 | if (0 != strcmp ("PUT", method)) | 100 | if (0 != strcmp ("PUT", method)) |
101 | return MHD_NO; /* unexpected method */ | 101 | return MHD_NO; /* unexpected method */ |
diff --git a/src/testcurl/test_put_chunked.c b/src/testcurl/test_put_chunked.c index 897f52b1..5820f2e0 100644 --- a/src/testcurl/test_put_chunked.c +++ b/src/testcurl/test_put_chunked.c | |||
@@ -90,13 +90,13 @@ ahc_echo (void *cls, | |||
90 | const char *method, | 90 | const char *method, |
91 | const char *version, | 91 | const char *version, |
92 | const char *upload_data, size_t *upload_data_size, | 92 | const char *upload_data, size_t *upload_data_size, |
93 | void **unused) | 93 | void **req_cls) |
94 | { | 94 | { |
95 | int *done = cls; | 95 | int *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 | int have; |
99 | (void) version; (void) unused; /* 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)) |
102 | return MHD_NO; /* unexpected method */ | 102 | return MHD_NO; /* unexpected method */ |
diff --git a/src/testcurl/test_quiesce.c b/src/testcurl/test_quiesce.c index 8b350237..1e0eb0c4 100644 --- a/src/testcurl/test_quiesce.c +++ b/src/testcurl/test_quiesce.c | |||
@@ -193,7 +193,7 @@ ahc_echo (void *cls, | |||
193 | const char *method, | 193 | const char *method, |
194 | const char *version, | 194 | const char *version, |
195 | const char *upload_data, size_t *upload_data_size, | 195 | const char *upload_data, size_t *upload_data_size, |
196 | void **unused) | 196 | void **req_cls) |
197 | { | 197 | { |
198 | static int ptr; | 198 | static int ptr; |
199 | const char *me = cls; | 199 | const char *me = cls; |
@@ -205,12 +205,12 @@ ahc_echo (void *cls, | |||
205 | fprintf (stderr, "Unexpected HTTP method '%s'. ", method); | 205 | fprintf (stderr, "Unexpected HTTP method '%s'. ", method); |
206 | externalErrorExit (); | 206 | externalErrorExit (); |
207 | } | 207 | } |
208 | if (&ptr != *unused) | 208 | if (&ptr != *req_cls) |
209 | { | 209 | { |
210 | *unused = &ptr; | 210 | *req_cls = &ptr; |
211 | return MHD_YES; | 211 | return MHD_YES; |
212 | } | 212 | } |
213 | *unused = NULL; | 213 | *req_cls = NULL; |
214 | response = MHD_create_response_from_buffer (strlen (url), | 214 | response = MHD_create_response_from_buffer (strlen (url), |
215 | (void *) url, | 215 | (void *) url, |
216 | MHD_RESPMEM_MUST_COPY); | 216 | MHD_RESPMEM_MUST_COPY); |
@@ -229,10 +229,10 @@ ahc_echo (void *cls, | |||
229 | 229 | ||
230 | static void | 230 | static void |
231 | request_completed (void *cls, struct MHD_Connection *connection, | 231 | request_completed (void *cls, struct MHD_Connection *connection, |
232 | void **con_cls, enum MHD_RequestTerminationCode code) | 232 | void **req_cls, enum MHD_RequestTerminationCode code) |
233 | { | 233 | { |
234 | int *done = (int *) cls; | 234 | int *done = (int *) cls; |
235 | (void) connection; (void) con_cls; (void) code; /* Unused. Silent compiler warning. */ | 235 | (void) connection; (void) req_cls; (void) code; /* Unused. Silent compiler warning. */ |
236 | if (MHD_REQUEST_TERMINATED_COMPLETED_OK != code) | 236 | if (MHD_REQUEST_TERMINATED_COMPLETED_OK != code) |
237 | { | 237 | { |
238 | fprintf (stderr, "Unexpected termination code: %d. ", (int) code); | 238 | fprintf (stderr, "Unexpected termination code: %d. ", (int) code); |
diff --git a/src/testcurl/test_quiesce_stream.c b/src/testcurl/test_quiesce_stream.c index 6d0ea599..dbfd982b 100644 --- a/src/testcurl/test_quiesce_stream.c +++ b/src/testcurl/test_quiesce_stream.c | |||
@@ -142,7 +142,7 @@ http_AccessHandlerCallback (void *cls, | |||
142 | const char *version, | 142 | const char *version, |
143 | const char *upload_data, | 143 | const char *upload_data, |
144 | size_t *upload_data_size, | 144 | size_t *upload_data_size, |
145 | void **con_cls) | 145 | void **req_cls) |
146 | { | 146 | { |
147 | enum MHD_Result ret; | 147 | enum MHD_Result ret; |
148 | struct MHD_Response *response; | 148 | struct MHD_Response *response; |
@@ -151,7 +151,7 @@ http_AccessHandlerCallback (void *cls, | |||
151 | (void) upload_data_size; /* Unused. Silent compiler warning. */ | 151 | (void) upload_data_size; /* Unused. Silent compiler warning. */ |
152 | 152 | ||
153 | /* Never respond on first call */ | 153 | /* Never respond on first call */ |
154 | if (NULL == *con_cls) | 154 | if (NULL == *req_cls) |
155 | { | 155 | { |
156 | struct ContentReaderUserdata *userdata; | 156 | struct ContentReaderUserdata *userdata; |
157 | fprintf (stderr, | 157 | fprintf (stderr, |
@@ -164,7 +164,7 @@ http_AccessHandlerCallback (void *cls, | |||
164 | return MHD_NO; | 164 | return MHD_NO; |
165 | userdata->bytes_written = 0; | 165 | userdata->bytes_written = 0; |
166 | userdata->connection = connection; | 166 | userdata->connection = connection; |
167 | *con_cls = userdata; | 167 | *req_cls = userdata; |
168 | return MHD_YES; | 168 | return MHD_YES; |
169 | } | 169 | } |
170 | 170 | ||
@@ -173,7 +173,7 @@ http_AccessHandlerCallback (void *cls, | |||
173 | = MHD_create_response_from_callback (MHD_SIZE_UNKNOWN, | 173 | = MHD_create_response_from_callback (MHD_SIZE_UNKNOWN, |
174 | 32 * 1024, | 174 | 32 * 1024, |
175 | &http_ContentReaderCallback, | 175 | &http_ContentReaderCallback, |
176 | *con_cls, | 176 | *req_cls, |
177 | &free_crc_data); | 177 | &free_crc_data); |
178 | ret = MHD_queue_response (connection, | 178 | ret = MHD_queue_response (connection, |
179 | MHD_HTTP_OK, | 179 | MHD_HTTP_OK, |
diff --git a/src/testcurl/test_termination.c b/src/testcurl/test_termination.c index 3e1c1f91..72b77219 100644 --- a/src/testcurl/test_termination.c +++ b/src/testcurl/test_termination.c | |||
@@ -56,7 +56,7 @@ connection_handler (void *cls, | |||
56 | const char *method, | 56 | const char *method, |
57 | const char *version, | 57 | const char *version, |
58 | const char *upload_data, size_t *upload_data_size, | 58 | const char *upload_data, size_t *upload_data_size, |
59 | void **ptr) | 59 | void **req_cls) |
60 | { | 60 | { |
61 | static int i; | 61 | static int i; |
62 | struct MHD_Response *response; | 62 | struct MHD_Response *response; |
@@ -65,9 +65,9 @@ connection_handler (void *cls, | |||
65 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ | 65 | (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ |
66 | (void) upload_data_size; /* Unused. Silent compiler warning. */ | 66 | (void) upload_data_size; /* Unused. Silent compiler warning. */ |
67 | 67 | ||
68 | if (*ptr == NULL) | 68 | if (*req_cls == NULL) |
69 | { | 69 | { |
70 | *ptr = &i; | 70 | *req_cls = &i; |
71 | return MHD_YES; | 71 | return MHD_YES; |
72 | } | 72 | } |
73 | 73 | ||
diff --git a/src/testcurl/test_timeout.c b/src/testcurl/test_timeout.c index 2a39fa13..5c184a20 100644 --- a/src/testcurl/test_timeout.c +++ b/src/testcurl/test_timeout.c | |||
@@ -96,11 +96,11 @@ struct CBC | |||
96 | static void | 96 | static void |
97 | termination_cb (void *cls, | 97 | termination_cb (void *cls, |
98 | struct MHD_Connection *connection, | 98 | struct MHD_Connection *connection, |
99 | void **con_cls, | 99 | void **req_cls, |
100 | enum MHD_RequestTerminationCode toe) | 100 | enum MHD_RequestTerminationCode toe) |
101 | { | 101 | { |
102 | int *test = cls; | 102 | int *test = cls; |
103 | (void) connection; (void) con_cls; /* Unused. Silent compiler warning. */ | 103 | (void) connection; (void) req_cls; /* Unused. Silent compiler warning. */ |
104 | 104 | ||
105 | switch (toe) | 105 | switch (toe) |
106 | { | 106 | { |
@@ -190,12 +190,12 @@ ahc_echo (void *cls, | |||
190 | const char *method, | 190 | const char *method, |
191 | const char *version, | 191 | const char *version, |
192 | const char *upload_data, size_t *upload_data_size, | 192 | const char *upload_data, size_t *upload_data_size, |
193 | void **unused) | 193 | void **req_cls) |
194 | { | 194 | { |
195 | int *done = cls; | 195 | int *done = cls; |
196 | struct MHD_Response *response; | 196 | struct MHD_Response *response; |
197 | enum MHD_Result ret; | 197 | enum MHD_Result ret; |
198 | (void) version; (void) unused; /* Unused. Silent compiler warning. */ | 198 | (void) version; (void) req_cls; /* Unused. Silent compiler warning. */ |
199 | 199 | ||
200 | if (0 != strcmp ("PUT", method)) | 200 | if (0 != strcmp ("PUT", method)) |
201 | return MHD_NO; /* unexpected method */ | 201 | return MHD_NO; /* unexpected method */ |
diff --git a/src/testcurl/test_toolarge.c b/src/testcurl/test_toolarge.c index 6f78d7ba..134fd8af 100644 --- a/src/testcurl/test_toolarge.c +++ b/src/testcurl/test_toolarge.c | |||
@@ -448,7 +448,7 @@ ahcCheck (void *cls, | |||
448 | const char *method, | 448 | const char *method, |
449 | const char *version, | 449 | const char *version, |
450 | const char *upload_data, size_t *upload_data_size, | 450 | const char *upload_data, size_t *upload_data_size, |
451 | void **con_cls) | 451 | void **req_cls) |
452 | { | 452 | { |
453 | static int ptr; | 453 | static int ptr; |
454 | struct MHD_Response *response; | 454 | struct MHD_Response *response; |
@@ -477,12 +477,12 @@ ahcCheck (void *cls, | |||
477 | if (0 != strcmp (param->rq_method, method)) | 477 | if (0 != strcmp (param->rq_method, method)) |
478 | mhdErrorExitDesc ("Unexpected request method"); | 478 | mhdErrorExitDesc ("Unexpected request method"); |
479 | 479 | ||
480 | if (&ptr != *con_cls) | 480 | if (&ptr != *req_cls) |
481 | { | 481 | { |
482 | *con_cls = &ptr; | 482 | *req_cls = &ptr; |
483 | return MHD_YES; | 483 | return MHD_YES; |
484 | } | 484 | } |
485 | *con_cls = NULL; | 485 | *req_cls = NULL; |
486 | 486 | ||
487 | if (1 > MHD_get_connection_values_n (connection, MHD_HEADER_KIND, | 487 | if (1 > MHD_get_connection_values_n (connection, MHD_HEADER_KIND, |
488 | &headerCheckerInterator, | 488 | &headerCheckerInterator, |
diff --git a/src/testcurl/test_tricky.c b/src/testcurl/test_tricky.c index 50af68a1..afb29bbd 100644 --- a/src/testcurl/test_tricky.c +++ b/src/testcurl/test_tricky.c | |||
@@ -385,7 +385,7 @@ ahcCheck (void *cls, | |||
385 | const char *method, | 385 | const char *method, |
386 | const char *version, | 386 | const char *version, |
387 | const char *upload_data, size_t *upload_data_size, | 387 | const char *upload_data, size_t *upload_data_size, |
388 | void **con_cls) | 388 | void **req_cls) |
389 | { | 389 | { |
390 | static int ptr; | 390 | static int ptr; |
391 | struct MHD_Response *response; | 391 | struct MHD_Response *response; |
@@ -413,12 +413,12 @@ ahcCheck (void *cls, | |||
413 | if (0 != strcmp (param->rq_method, method)) | 413 | if (0 != strcmp (param->rq_method, method)) |
414 | mhdErrorExitDesc ("Unexpected request method"); | 414 | mhdErrorExitDesc ("Unexpected request method"); |
415 | 415 | ||
416 | if (&ptr != *con_cls) | 416 | if (&ptr != *req_cls) |
417 | { | 417 | { |
418 | *con_cls = &ptr; | 418 | *req_cls = &ptr; |
419 | return MHD_YES; | 419 | return MHD_YES; |
420 | } | 420 | } |
421 | *con_cls = NULL; | 421 | *req_cls = NULL; |
422 | 422 | ||
423 | if (1 > MHD_get_connection_values_n (connection, MHD_HEADER_KIND, | 423 | if (1 > MHD_get_connection_values_n (connection, MHD_HEADER_KIND, |
424 | &headerCheckerInterator, | 424 | &headerCheckerInterator, |
diff --git a/src/testcurl/test_urlparse.c b/src/testcurl/test_urlparse.c index bc0411a9..0145b5f1 100644 --- a/src/testcurl/test_urlparse.c +++ b/src/testcurl/test_urlparse.c | |||
@@ -98,7 +98,7 @@ ahc_echo (void *cls, | |||
98 | const char *method, | 98 | const char *method, |
99 | const char *version, | 99 | const char *version, |
100 | const char *upload_data, size_t *upload_data_size, | 100 | const char *upload_data, size_t *upload_data_size, |
101 | void **unused) | 101 | void **req_cls) |
102 | { | 102 | { |
103 | static int ptr; | 103 | static int ptr; |
104 | const char *me = cls; | 104 | const char *me = cls; |
@@ -108,16 +108,16 @@ ahc_echo (void *cls, | |||
108 | 108 | ||
109 | if (0 != strcmp (me, method)) | 109 | if (0 != strcmp (me, method)) |
110 | return MHD_NO; /* unexpected method */ | 110 | return MHD_NO; /* unexpected method */ |
111 | if (&ptr != *unused) | 111 | if (&ptr != *req_cls) |
112 | { | 112 | { |
113 | *unused = &ptr; | 113 | *req_cls = &ptr; |
114 | return MHD_YES; | 114 | return MHD_YES; |
115 | } | 115 | } |
116 | MHD_get_connection_values (connection, | 116 | MHD_get_connection_values (connection, |
117 | MHD_GET_ARGUMENT_KIND, | 117 | MHD_GET_ARGUMENT_KIND, |
118 | &test_values, | 118 | &test_values, |
119 | NULL); | 119 | NULL); |
120 | *unused = NULL; | 120 | *req_cls = NULL; |
121 | response = MHD_create_response_from_buffer (strlen (url), | 121 | response = MHD_create_response_from_buffer (strlen (url), |
122 | (void *) url, | 122 | (void *) url, |
123 | MHD_RESPMEM_MUST_COPY); | 123 | MHD_RESPMEM_MUST_COPY); |