mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
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:
@@ -137,7 +137,7 @@ http_ahc (void *cls,
|
||||
const char *method,
|
||||
const char *version,
|
||||
const char *upload_data,
|
||||
size_t *upload_data_size, void **ptr)
|
||||
size_t *upload_data_size, void **req_cls)
|
||||
{
|
||||
static int aptr;
|
||||
struct MHD_Response *response;
|
||||
@@ -152,13 +152,13 @@ http_ahc (void *cls,
|
||||
|
||||
if (0 != strcmp (method, MHD_HTTP_METHOD_GET))
|
||||
return MHD_NO; /* unexpected method */
|
||||
if (&aptr != *ptr)
|
||||
if (&aptr != *req_cls)
|
||||
{
|
||||
/* do never respond on first call */
|
||||
*ptr = &aptr;
|
||||
*req_cls = &aptr;
|
||||
return MHD_YES;
|
||||
}
|
||||
*ptr = NULL; /* reset when done */
|
||||
*req_cls = NULL; /* reset when done */
|
||||
|
||||
file = fopen (&url[1], "rb");
|
||||
if (NULL != file)
|
||||
|
||||
Reference in New Issue
Block a user