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/testcurl/perf_get.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/testcurl/perf_get.c')
-rw-r--r-- | src/testcurl/perf_get.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/testcurl/perf_get.c b/src/testcurl/perf_get.c index 9a7e3e08..3ee1c388 100644 --- a/src/testcurl/perf_get.c +++ b/src/testcurl/perf_get.c | |||
@@ -168,7 +168,7 @@ ahc_echo (void *cls, | |||
168 | const char *method, | 168 | const char *method, |
169 | const char *version, | 169 | const char *version, |
170 | const char *upload_data, size_t *upload_data_size, | 170 | const char *upload_data, size_t *upload_data_size, |
171 | void **unused) | 171 | void **req_cls) |
172 | { | 172 | { |
173 | static int ptr; | 173 | static int ptr; |
174 | const char *me = cls; | 174 | const char *me = cls; |
@@ -178,12 +178,12 @@ ahc_echo (void *cls, | |||
178 | 178 | ||
179 | if (0 != strcmp (me, method)) | 179 | if (0 != strcmp (me, method)) |
180 | return MHD_NO; /* unexpected method */ | 180 | return MHD_NO; /* unexpected method */ |
181 | if (&ptr != *unused) | 181 | if (&ptr != *req_cls) |
182 | { | 182 | { |
183 | *unused = &ptr; | 183 | *req_cls = &ptr; |
184 | return MHD_YES; | 184 | return MHD_YES; |
185 | } | 185 | } |
186 | *unused = NULL; | 186 | *req_cls = NULL; |
187 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); | 187 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); |
188 | if (ret == MHD_NO) | 188 | if (ret == MHD_NO) |
189 | abort (); | 189 | abort (); |