diff options
Diffstat (limited to 'src/examples/upgrade_example.c')
-rw-r--r-- | src/examples/upgrade_example.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/examples/upgrade_example.c b/src/examples/upgrade_example.c index 08c718d0..547f1b6c 100644 --- a/src/examples/upgrade_example.c +++ b/src/examples/upgrade_example.c | |||
@@ -169,7 +169,7 @@ run_usock (void *cls) | |||
169 | * @param connection original HTTP connection handle, | 169 | * @param connection original HTTP connection handle, |
170 | * giving the function a last chance | 170 | * giving the function a last chance |
171 | * to inspect the original HTTP request | 171 | * to inspect the original HTTP request |
172 | * @param con_cls last value left in `con_cls` of the `MHD_AccessHandlerCallback` | 172 | * @param req_cls last value left in `req_cls` of the `MHD_AccessHandlerCallback` |
173 | * @param extra_in if we happened to have read bytes after the | 173 | * @param extra_in if we happened to have read bytes after the |
174 | * HTTP header already (because the client sent | 174 | * HTTP header already (because the client sent |
175 | * more than the HTTP header of the request before | 175 | * more than the HTTP header of the request before |
@@ -194,7 +194,7 @@ run_usock (void *cls) | |||
194 | static void | 194 | static void |
195 | uh_cb (void *cls, | 195 | uh_cb (void *cls, |
196 | struct MHD_Connection *connection, | 196 | struct MHD_Connection *connection, |
197 | void *con_cls, | 197 | void *req_cls, |
198 | const char *extra_in, | 198 | const char *extra_in, |
199 | size_t extra_in_size, | 199 | size_t extra_in_size, |
200 | MHD_socket sock, | 200 | MHD_socket sock, |
@@ -204,7 +204,7 @@ uh_cb (void *cls, | |||
204 | pthread_t pt; | 204 | pthread_t pt; |
205 | (void) cls; /* Unused. Silent compiler warning. */ | 205 | (void) cls; /* Unused. Silent compiler warning. */ |
206 | (void) connection; /* Unused. Silent compiler warning. */ | 206 | (void) connection; /* Unused. Silent compiler warning. */ |
207 | (void) con_cls; /* Unused. Silent compiler warning. */ | 207 | (void) req_cls; /* Unused. Silent compiler warning. */ |
208 | 208 | ||
209 | md = malloc (sizeof (struct MyData)); | 209 | md = malloc (sizeof (struct MyData)); |
210 | if (NULL == md) | 210 | if (NULL == md) |
@@ -247,7 +247,7 @@ ahc_echo (void *cls, | |||
247 | const char *version, | 247 | const char *version, |
248 | const char *upload_data, | 248 | const char *upload_data, |
249 | size_t *upload_data_size, | 249 | size_t *upload_data_size, |
250 | void **ptr) | 250 | void **req_cls) |
251 | { | 251 | { |
252 | static int aptr; | 252 | static int aptr; |
253 | struct MHD_Response *response; | 253 | struct MHD_Response *response; |
@@ -260,13 +260,13 @@ ahc_echo (void *cls, | |||
260 | 260 | ||
261 | if (0 != strcmp (method, "GET")) | 261 | if (0 != strcmp (method, "GET")) |
262 | return MHD_NO; /* unexpected method */ | 262 | return MHD_NO; /* unexpected method */ |
263 | if (&aptr != *ptr) | 263 | if (&aptr != *req_cls) |
264 | { | 264 | { |
265 | /* do never respond on first call */ | 265 | /* do never respond on first call */ |
266 | *ptr = &aptr; | 266 | *req_cls = &aptr; |
267 | return MHD_YES; | 267 | return MHD_YES; |
268 | } | 268 | } |
269 | *ptr = NULL; /* reset when done */ | 269 | *req_cls = NULL; /* reset when done */ |
270 | response = MHD_create_response_for_upgrade (&uh_cb, | 270 | response = MHD_create_response_for_upgrade (&uh_cb, |
271 | NULL); | 271 | NULL); |
272 | 272 | ||