aboutsummaryrefslogtreecommitdiff
path: root/doc/examples/websocket.c
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/websocket.c')
-rw-r--r--doc/examples/websocket.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/examples/websocket.c b/doc/examples/websocket.c
index 4fa6f4ed..5cdf0423 100644
--- a/doc/examples/websocket.c
+++ b/doc/examples/websocket.c
@@ -80,7 +80,7 @@ make_blocking (MHD_socket fd);
80static void 80static void
81upgrade_handler (void *cls, 81upgrade_handler (void *cls,
82 struct MHD_Connection *connection, 82 struct MHD_Connection *connection,
83 void *con_cls, 83 void *req_cls,
84 const char *extra_in, 84 const char *extra_in,
85 size_t extra_in_size, 85 size_t extra_in_size,
86 MHD_socket fd, 86 MHD_socket fd,
@@ -307,7 +307,7 @@ access_handler (void *cls,
307 const char *version, 307 const char *version,
308 const char *upload_data, 308 const char *upload_data,
309 size_t *upload_data_size, 309 size_t *upload_data_size,
310 void **ptr) 310 void **req_cls)
311{ 311{
312 static int aptr; 312 static int aptr;
313 struct MHD_Response *response; 313 struct MHD_Response *response;
@@ -319,13 +319,13 @@ access_handler (void *cls,
319 319
320 if (0 != strcmp (method, "GET")) 320 if (0 != strcmp (method, "GET"))
321 return MHD_NO; /* unexpected method */ 321 return MHD_NO; /* unexpected method */
322 if (&aptr != *ptr) 322 if (&aptr != *req_cls)
323 { 323 {
324 /* do never respond on first call */ 324 /* do never respond on first call */
325 *ptr = &aptr; 325 *req_cls = &aptr;
326 return MHD_YES; 326 return MHD_YES;
327 } 327 }
328 *ptr = NULL; /* reset when done */ 328 *req_cls = NULL; /* reset when done */
329 329
330 if (0 == strcmp (url, "/")) 330 if (0 == strcmp (url, "/"))
331 { 331 {