aboutsummaryrefslogtreecommitdiff
path: root/src/examples/minimal_example_comet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/minimal_example_comet.c')
-rw-r--r--src/examples/minimal_example_comet.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/examples/minimal_example_comet.c b/src/examples/minimal_example_comet.c
index c36bf2ce..a8864d89 100644
--- a/src/examples/minimal_example_comet.c
+++ b/src/examples/minimal_example_comet.c
@@ -44,7 +44,7 @@ ahc_echo (void *cls,
44 const char *url, 44 const char *url,
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, void **ptr) 47 const char *upload_data, size_t *upload_data_size, void **req_cls)
48{ 48{
49 static int aptr; 49 static int aptr;
50 struct MHD_Response *response; 50 struct MHD_Response *response;
@@ -57,13 +57,13 @@ ahc_echo (void *cls,
57 57
58 if (0 != strcmp (method, "GET")) 58 if (0 != strcmp (method, "GET"))
59 return MHD_NO; /* unexpected method */ 59 return MHD_NO; /* unexpected method */
60 if (&aptr != *ptr) 60 if (&aptr != *req_cls)
61 { 61 {
62 /* do never respond on first call */ 62 /* do never respond on first call */
63 *ptr = &aptr; 63 *req_cls = &aptr;
64 return MHD_YES; 64 return MHD_YES;
65 } 65 }
66 *ptr = NULL; /* reset when done */ 66 *req_cls = NULL; /* reset when done */
67 response = MHD_create_response_from_callback (MHD_SIZE_UNKNOWN, 67 response = MHD_create_response_from_callback (MHD_SIZE_UNKNOWN,
68 80, 68 80,
69 &data_generator, NULL, NULL); 69 &data_generator, NULL, NULL);