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.
This commit is contained in:
Evgeny Grin (Karlson2k)
2022-01-18 15:18:40 +03:00
parent 17c22c2c3b
commit bd41946e8f
105 changed files with 507 additions and 510 deletions
+4 -4
View File
@@ -99,7 +99,7 @@ ahc_empty (void *cls,
const char *version,
const char *upload_data,
size_t *upload_data_size,
void **unused)
void **req_cls)
{
static int ptr;
struct MHD_Response *response;
@@ -114,12 +114,12 @@ ahc_empty (void *cls,
if (0 != strcmp ("GET",
method))
return MHD_NO; /* unexpected method */
if (&ptr != *unused)
if (&ptr != *req_cls)
{
*unused = &ptr;
*req_cls = &ptr;
return MHD_YES;
}
*unused = NULL;
*req_cls = NULL;
response = MHD_create_response_from_buffer (0,
NULL,
MHD_RESPMEM_PERSISTENT);