[Top][All Lists]

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

Re: [libmicrohttpd] libmicrohttpd 0.9.49 released

From: Martin Bonner
Subject: Re: [libmicrohttpd] libmicrohttpd 0.9.49 released
Date: Tue, 12 Apr 2016 16:01:47 +0000

That is the same.  The name of a function decays into a pointer to that function in just the same way

as the name of an array decays into a pointer to the first element.  The only exception is if the function

name is the argument of the address-of operator.  So “AcceptPolicyCallback“ and &AcceptPolicyCallback

have the same value and the same type.


Pretty sure that is true in both C and C++.


Von: libmicrohttpd [mailto:libmicrohttpd-bounces+address@hidden Im Auftrag von silvioprog
Gesendet: Dienstag, 12. April 2016 16:37
An: libmicrohttpd development and user mailinglist <address@hidden>
Betreff: Re: [libmicrohttpd] libmicrohttpd 0.9.49 released


It worked fine here on Windows. I don't know how C++ declares pointers, but looking at this line:


    struct MHD_Daemon *daemon = MHD_start_daemon( daemon_flags, 0,

                                                  http_AcceptPolicyCallback, NULL,

                                                  http_AccessHandlerCallback, NULL, ...


You should use something like this:


    struct MHD_Daemon *daemon = MHD_start_daemon( daemon_flags, 0,

                                                  &http_AcceptPolicyCallback, NULL,

                                                  &http_AccessHandlerCallback, NULL, ...


Try the "A minimal example" available at MHD home page: .


On Tue, Apr 12, 2016 at 11:10 AM, Markus Doppelbauer <address@hidden> wrote:



Thanks a lot.

For me, 0.9.49 does not work - it never enters the

"AccessHandlerCallback()" handler. I have attached

a small testcase.


Steps to reproduce:

g++ -o testmhd test.cpp -I/tmp/libmicrohttpd-0.9.49/src/include/ -L/tmp/libmicrohttpd-0.9.49/src/microhttpd/.libs/ -lmicrohttpd

LD_LIBRARY_PATH=/tmp/libmicrohttpd-0.9.49/src/microhttpd/.libs/ ./testmhd                                                      

wget -O /dev/null



Silvio Clécio

reply via email to

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