mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-26 04:09:30 +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:
@@ -46,7 +46,7 @@ ahc_echo (void *cls,
|
||||
const char *method,
|
||||
const char *version,
|
||||
const char *upload_data, size_t *upload_data_size,
|
||||
void **unused)
|
||||
void **req_cls)
|
||||
{
|
||||
static int ptr;
|
||||
const char *me = cls;
|
||||
@@ -56,12 +56,12 @@ ahc_echo (void *cls,
|
||||
|
||||
if (0 != strcmp (me, 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 (strlen (url),
|
||||
(void *) url,
|
||||
MHD_RESPMEM_MUST_COPY);
|
||||
|
||||
Reference in New Issue
Block a user