[libmicrohttpd] Docs and A "minimal example" - warning: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type

2021-11-30 Thread Gavin Henry
bs to help me reproduce? Thanks, Gavin. -- Kind Regards, Gavin Henry. https://sentrypeer.org

Re: [libmicrohttpd] Docs and A "minimal example" - warning: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type

2021-12-01 Thread Gavin Henry
Seems to be just on Ubuntu 20.04 so will look to see what MHD version gets pulled in.

Re: [libmicrohttpd] Docs and A "minimal example" - warning: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type

2021-12-01 Thread Gavin Henry
Hi Evgeny, Thanks. I'm at the journey point now. I am looking to upgrade the runners in GitHub CI, but will look at that header too. Gavin.

Re: [libmicrohttpd] Docs and A "minimal example" - warning: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type

2021-12-01 Thread Gavin Henry
Agreed! :-)

[libmicrohttpd] Adding to projects that use libmicrohttpd list

2021-12-02 Thread Gavin Henry
Hi all, Could I add https://github.com/SentryPeer/SentryPeer to the list? or https://sentrypeer.org Thanks. -- Kind Regards, Gavin Henry. https://sentrypeer.org

Re: [libmicrohttpd] Adding to projects that use libmicrohttpd list

2021-12-03 Thread Gavin Henry
Thanks!

[libmicrohttpd] Ubuntu 20.04 LTS libmicrohttpd backport or PPA?

2021-12-04 Thread Gavin Henry
like my GitHub Actions (https://github.com/SentryPeer/SentryPeer/actions) to use the latest version of MHD, so I went for Homebrew but that seems broken on Ubuntu/Debian. The last resort is building from a tar in the actions. Thanks, Gavin. -- Kind Regards, Gavin Henry. https://sentrypeer.org

Re: [libmicrohttpd] Ubuntu 20.04 LTS libmicrohttpd backport or PPA?

2021-12-04 Thread Gavin Henry
Nevermind, found this one! https://launchpad.net/~savoury1/+archive/ubuntu/utilities v0.9.72 in it. I'll see if they can update to 0.9.73

[libmicrohttpd] Route lookups

2021-12-15 Thread Gavin Henry
Hi all, Does anyone have an example of how you're mapping routes/urls to functions before I crack on with my own? Thanks, Gavin. -- Kind Regards, Gavin Henry. https://sentrypeer.org

Re: [libmicrohttpd] Route lookups

2021-12-15 Thread Gavin Henry
> You can, among other things, map routes with parameters to call > functions based on the expected url. > > https://github.com/babelouest/ulfius I was actually just reading your source and examples before I was going to do a dispatch table :-) -- Kind Regards, Gavin

Re: [libmicrohttpd] Route lookups

2021-12-15 Thread Gavin Henry
oflora/libsagui/blob/master/examples/example_router_vars.c > > Feel absolutely free to use it and/or send suggestions! Cool! I'll take a look. Thanks for sharing. -- Kind Regards, Gavin Henry. https://sentrypeer.org

Re: [libmicrohttpd] Route lookups

2021-12-15 Thread Gavin Henry
> Cool! I'll take a look. Thanks for sharing. I was just looking for a Hash table implementation too. Spotted you're using uthash. Will take a look. -- Kind Regards, Gavin Henry. https://sentrypeer.org

[libmicrohttpd] Passing data into MHD_start_daemon

2021-12-17 Thread Gavin Henry
/blob/99a5b5be48c788d9e5f4177725babc5a97e8f37e/src/http_daemon.c#L56 Is that the correct way? It looks like I should be using **ptr at: https://github.com/SentryPeer/SentryPeer/blob/99a5b5be48c788d9e5f4177725babc5a97e8f37e/src/http_daemon.c#L59 But how do I set that in MHD_start_daemon() Thanks. -- Kind Regards, Gavin

Re: [libmicrohttpd] Passing data into MHD_start_daemon

2021-12-17 Thread Gavin Henry
Hi Silvio, Thanks. That's what I thought and what I was doing. The problem was just the pointer I was passing in wasn't getting cast correctly in my ahc_get. Newbie :-) All good now. Really appreciated your reply though!

Re: [libmicrohttpd] Passing data into MHD_start_daemon

2021-12-17 Thread Gavin Henry
Yeah, that looks right. same as in the examples: https://github.com/rboulton/libmicrohttpd/blob/61ce9c138338ed34d477482cd5efcaf1bde422dc/src/examples/minimal_example.c#L39

[libmicrohttpd] Url Pathpart regex or similar

2021-12-18 Thread Gavin Henry
Hi all, When not using url params, is there anything built in to grab say: /ip_addresses/{ip_address} e.g. like https://github.com/SentryPeer/SentryPeer/blob/87ec0dd7438b9ea8b58c83a75980e4c90076d88e/src/http_routes.h#L21 Alternatively, I could just do: /ip_addresses?ip_address={ip_address}

Re: [libmicrohttpd] Url Pathpart regex or similar

2021-12-18 Thread Gavin Henry
Ah, forgot about https://www.mail-archive.com/libmicrohttpd@gnu.org/msg02744.html On Sat, 18 Dec 2021, 11:45 Gavin Henry, wrote: > Hi all, > > When not using url params, is there anything built in to grab say: > > /ip_addresses/{ip_address} > > e.g. like > > >

Re: [libmicrohttpd] GNU libmicrohttpd 0.9.74 released

2021-12-19 Thread Gavin Henry
I'm also glad I selected this too at this time for SentryPeer. Congratulations! On Mon, 20 Dec 2021, 00:44 silvioprog, wrote: > Thanks a lot for this new release! 🍻 > > On Sun, Dec 19, 2021 at 1:13 PM Evgeny Grin wrote: > >> Dear all, >> >> I'm very glad to finally announce the new release of G

Re: [libmicrohttpd] GNU libmicrohttpd 0.9.75 released

2021-12-26 Thread Gavin Henry
Thanks! Is this the official changelog? https://github.com/Karlson2k/libmicrohttpd/blob/master/ChangeLog On Sun, 26 Dec 2021, 18:03 Evgeny Grin, wrote: > Dear all, > > I'm glad to announce the new release of GNU libmicrohttpd library > version 0.9.75. > > This is a correction release. > The ma

[libmicrohttpd] Freeing data added to MHD_create_response_from_buffer

2022-01-17 Thread Gavin Henry
nt: https://github.com/SentryPeer/SentryPeer/blob/main/src/http_ip_address_route.c#L45 this is my messy route_handler at the moment: https://github.com/SentryPeer/SentryPeer/blob/8eb8db5b71be9c3e6b987850569992121846ef41/src/http_routes.c#L44 Thanks. -- Kind Regards, Gavin Henry. https://sentrypeer.org

Re: [libmicrohttpd] Freeing data added to MHD_create_response_from_buffer

2022-01-17 Thread Gavin Henry
_with_free_callback. The second option > can be avoided in your case, since it will duplicate 'reply' content in > the heap. Thanks Nicolas! It was right in front of my eyes. I didn't even this to read about the "mode". I was thinking that was like the daemon start up as per all the discussions of "mode" at: -- Kind Regards, Gavin Henry. https://sentrypeer.org

Re: [libmicrohttpd] Freeing data added to MHD_create_response_from_buffer

2022-01-17 Thread Gavin Henry
mode at: https://www.gnu.org/software/libmicrohttpd/

Re: [libmicrohttpd] Freeing data added to MHD_create_response_from_buffer

2022-01-17 Thread Gavin Henry
Awesome. All leaks are now gone! Thank you Nicolas.

[libmicrohttpd] Using MHD_stop_daemon with signal() or elsewhere?

2022-01-24 Thread Gavin Henry
Hi all, Just running some valgrind and libasan things and seeing some leaks as I'm not using MHD_stop_daemon at all. Should I be concerned here as any killing of my project is via Ctrl-C or systemd via packaging. What are others doing with MHD_stop_daemon()? Thanks. -- Kind Regards,

Re: [libmicrohttpd] Using MHD_stop_daemon with signal() or elsewhere?

2022-01-24 Thread Gavin Henry
some guidance on that systemd requirement? Will Google. Thanks. -- Kind Regards, Gavin Henry. https://sentrypeer.org

Re: [libmicrohttpd] Using MHD_stop_daemon with signal() or elsewhere?

2022-01-25 Thread Gavin Henry
> On 24.01.2022 22:16, Gavin Henry wrote: > >> Using graceful closure is one of the vital thing for correct > >> implementation of any application. > > > > Understood. > > > >> Of course you *must* call MHD_stop_daemon() as it stops MHD threads,

Re: [libmicrohttpd] Using MHD_stop_daemon with signal() or elsewhere?

2022-01-25 Thread Gavin Henry
> > On 24.01.2022 22:16, Gavin Henry wrote: > > >> Using graceful closure is one of the vital thing for correct > > >> implementation of any application. > > > > > > Understood. > > > > > >> Of course you *must* call MHD_stop

[libmicrohttpd] Let's Encrypt handler

2022-05-18 Thread Gavin Henry
Hi all, Has anyone done this before in their project? I'm looking to add TLS to SentryPeer and need to grab a cert, then I'll use it in mhd for our API. I know it's easy to a serve HTTPS already in mhd. Thanks, Gavin.

Re: [libmicrohttpd] Let's Encrypt handler

2022-05-18 Thread Gavin Henry
Thanks Silvio. In my head, I have just set up a "/.well-known" handler and processing/serving up what it needs. Maybe this can only be done on the CLI by the admin of my project. Was trying to think of an automated way to get your cert and put it in the right place. Gavin.

Re: [libmicrohttpd] Let's Encrypt handler

2022-05-18 Thread Gavin Henry
Thanks!