[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] socket_context not set (libmicrohttpd-0.9.50)

From: Christian Grothoff
Subject: Re: [libmicrohttpd] socket_context not set (libmicrohttpd-0.9.50)
Date: Thu, 1 Jun 2017 17:40:23 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Sorry, was mistaken, the API does already exist as it should. The
argument you need to pass is aptly named:


On 06/01/2017 05:33 PM, Christian Grothoff wrote:
> Hi Miguel,
> There are two contexts, the "socket context" and the "request context".
> The access handler is given the "request context", to get the socket
> context there we would have to extend the MHD_get_connection_info() API
> to allow you to get it during the access handler.  I guess that's an
> oversight in the API, as we should make it possible for you to get the
> access context. I'll put it on my list of things to fix.
> -Christian
> On 06/01/2017 05:11 PM, Miguel Sancho wrote:
>> Hi,
>> finding the following issue (libmicrohttpd-0.9.50),
>> I would like to check whether this is already known.
>> Seems that socket_context is not set in #MHD_AccessHandlerCallback.
>>   * In #MHD_NotifyConnectionCallback (STARTED), **socket_context object
>>     is created
>>   * In #MHD_AccessHandlerCallback, *socket_context is a NULL pointer
>>   * In #MHD_NotifyConnectionCallback (STARTED), **socket_context object
>>     is created
>> Code sample:
>> /const MHD_ConnectionInfo *connectionInfo =
>> MHD_get_connection_info(connection,MHD_CONNECTION_INFO_SOCKET_CONTEXT);
>> if (*(connectionInfo->socket_context == NULL))
>> {
>> printf("ERROR\n");
>> }
>> /
>> Any idea?
>> Thanks
>> Miguel

Attachment: 0xE29FC3CC.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]