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/test_process_arguments.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/test_process_arguments.c')
-rw-r--r-- | src/testcurl/test_process_arguments.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/testcurl/test_process_arguments.c b/src/testcurl/test_process_arguments.c index aaf9681e..24d5e72f 100644 --- a/src/testcurl/test_process_arguments.c +++ b/src/testcurl/test_process_arguments.c | |||
@@ -69,7 +69,7 @@ ahc_echo (void *cls, | |||
69 | const char *method, | 69 | const char *method, |
70 | const char *version, | 70 | const char *version, |
71 | const char *upload_data, size_t *upload_data_size, | 71 | const char *upload_data, size_t *upload_data_size, |
72 | void **unused) | 72 | void **req_cls) |
73 | { | 73 | { |
74 | static int ptr; | 74 | static int ptr; |
75 | const char *me = cls; | 75 | const char *me = cls; |
@@ -80,12 +80,12 @@ ahc_echo (void *cls, | |||
80 | 80 | ||
81 | if (0 != strcmp (me, method)) | 81 | if (0 != strcmp (me, method)) |
82 | return MHD_NO; /* unexpected method */ | 82 | return MHD_NO; /* unexpected method */ |
83 | if (&ptr != *unused) | 83 | if (&ptr != *req_cls) |
84 | { | 84 | { |
85 | *unused = &ptr; | 85 | *req_cls = &ptr; |
86 | return MHD_YES; | 86 | return MHD_YES; |
87 | } | 87 | } |
88 | *unused = NULL; | 88 | *req_cls = NULL; |
89 | hdr = MHD_lookup_connection_value (connection, MHD_GET_ARGUMENT_KIND, "k"); | 89 | hdr = MHD_lookup_connection_value (connection, MHD_GET_ARGUMENT_KIND, "k"); |
90 | if ((hdr == NULL) || (0 != strcmp (hdr, "v x"))) | 90 | if ((hdr == NULL) || (0 != strcmp (hdr, "v x"))) |
91 | abort (); | 91 | abort (); |