aboutsummaryrefslogtreecommitdiff
path: root/src/examples/minimal_example.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/minimal_example.c')
-rw-r--r--src/examples/minimal_example.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/examples/minimal_example.c b/src/examples/minimal_example.c
index a02b5d50..ce604555 100644
--- a/src/examples/minimal_example.c
+++ b/src/examples/minimal_example.c
@@ -36,7 +36,7 @@ ahc_echo (void *cls,
36 const char *version, 36 const char *version,
37 const char *upload_data, 37 const char *upload_data,
38 size_t *upload_data_size, 38 size_t *upload_data_size,
39 void **ptr) 39 void **req_cls)
40{ 40{
41 static int aptr; 41 static int aptr;
42 const char *me = cls; 42 const char *me = cls;
@@ -50,13 +50,13 @@ ahc_echo (void *cls,
50 50
51 if (0 != strcmp (method, "GET")) 51 if (0 != strcmp (method, "GET"))
52 return MHD_NO; /* unexpected method */ 52 return MHD_NO; /* unexpected method */
53 if (&aptr != *ptr) 53 if (&aptr != *req_cls)
54 { 54 {
55 /* do never respond on first call */ 55 /* do never respond on first call */
56 *ptr = &aptr; 56 *req_cls = &aptr;
57 return MHD_YES; 57 return MHD_YES;
58 } 58 }
59 *ptr = NULL; /* reset when done */ 59 *req_cls = NULL; /* reset when done */
60 response = MHD_create_response_from_buffer (strlen (me), 60 response = MHD_create_response_from_buffer (strlen (me),
61 (void *) me, 61 (void *) me,
62 MHD_RESPMEM_PERSISTENT); 62 MHD_RESPMEM_PERSISTENT);