diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-01-18 15:17:21 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-01-18 15:18:40 +0300 |
commit | bd41946e8f4f2086f7b2fcacc468a668c0676aff (patch) | |
tree | 151e103d07dc210f8365bbef0c26361d29873850 /src/examples/minimal_example_empty_tls.c | |
parent | 17c22c2c3b8e2b56874ff701be58e7c10d1d41f4 (diff) | |
download | libmicrohttpd-bd41946e8f4f2086f7b2fcacc468a668c0676aff.tar.gz libmicrohttpd-bd41946e8f4f2086f7b2fcacc468a668c0676aff.zip |
Renamed 'con_cls' -> 'req_cls' for access handler callback
The argument is actually request-specific, not connection specific. The
name was confusing.
Fixed related documentation and clarified usage.
Also fixed code where argument named 'unused' was actually used.
Diffstat (limited to 'src/examples/minimal_example_empty_tls.c')
-rw-r--r-- | src/examples/minimal_example_empty_tls.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/examples/minimal_example_empty_tls.c b/src/examples/minimal_example_empty_tls.c index 70d7bd71..f03884c8 100644 --- a/src/examples/minimal_example_empty_tls.c +++ b/src/examples/minimal_example_empty_tls.c | |||
@@ -34,7 +34,7 @@ ahc_echo (void *cls, | |||
34 | const char *version, | 34 | const char *version, |
35 | const char *upload_data, | 35 | const char *upload_data, |
36 | size_t *upload_data_size, | 36 | size_t *upload_data_size, |
37 | void **ptr) | 37 | void **req_cls) |
38 | { | 38 | { |
39 | static int aptr; | 39 | static int aptr; |
40 | struct MHD_Response *response; | 40 | struct MHD_Response *response; |
@@ -48,13 +48,13 @@ ahc_echo (void *cls, | |||
48 | 48 | ||
49 | if (0 != strcmp (method, "GET")) | 49 | if (0 != strcmp (method, "GET")) |
50 | return MHD_NO; /* unexpected method */ | 50 | return MHD_NO; /* unexpected method */ |
51 | if (&aptr != *ptr) | 51 | if (&aptr != *req_cls) |
52 | { | 52 | { |
53 | /* do never respond on first call */ | 53 | /* do never respond on first call */ |
54 | *ptr = &aptr; | 54 | *req_cls = &aptr; |
55 | return MHD_YES; | 55 | return MHD_YES; |
56 | } | 56 | } |
57 | *ptr = NULL; /* reset when done */ | 57 | *req_cls = NULL; /* reset when done */ |
58 | response = MHD_create_response_from_buffer (0, | 58 | response = MHD_create_response_from_buffer (0, |
59 | NULL, | 59 | NULL, |
60 | MHD_RESPMEM_PERSISTENT); | 60 | MHD_RESPMEM_PERSISTENT); |