aboutsummaryrefslogtreecommitdiff
path: root/src/examples/querystring_example.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/querystring_example.c')
-rw-r--r--src/examples/querystring_example.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/examples/querystring_example.c b/src/examples/querystring_example.c
index 975d17f2..d33767cb 100644
--- a/src/examples/querystring_example.c
+++ b/src/examples/querystring_example.c
@@ -35,7 +35,7 @@ ahc_echo (void *cls,
35 const char *url, 35 const char *url,
36 const char *method, 36 const char *method,
37 const char *version, 37 const char *version,
38 const char *upload_data, size_t *upload_data_size, void **ptr) 38 const char *upload_data, size_t *upload_data_size, void **req_cls)
39{ 39{
40 static int aptr; 40 static int aptr;
41 const char *fmt = cls; 41 const char *fmt = cls;
@@ -51,13 +51,13 @@ ahc_echo (void *cls,
51 51
52 if (0 != strcmp (method, "GET")) 52 if (0 != strcmp (method, "GET"))
53 return MHD_NO; /* unexpected method */ 53 return MHD_NO; /* unexpected method */
54 if (&aptr != *ptr) 54 if (&aptr != *req_cls)
55 { 55 {
56 /* do never respond on first call */ 56 /* do never respond on first call */
57 *ptr = &aptr; 57 *req_cls = &aptr;
58 return MHD_YES; 58 return MHD_YES;
59 } 59 }
60 *ptr = NULL; /* reset when done */ 60 *req_cls = NULL; /* reset when done */
61 if (NULL == fmt) 61 if (NULL == fmt)
62 return MHD_NO; /* The cls must not be NULL */ 62 return MHD_NO; /* The cls must not be NULL */
63 val = MHD_lookup_connection_value (connection, MHD_GET_ARGUMENT_KIND, "q"); 63 val = MHD_lookup_connection_value (connection, MHD_GET_ARGUMENT_KIND, "q");