Re: Removal of GNUNET_CONFIGURATION_default() in 0.23
Alessio Vanni <[email protected]> Tue, 10 Dec 2024 21:15:03 +0100
| Newsgroups | gmane.network.gnunet.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, (for some reason I didn't receive Christian's e-mail, so I'm replying here for both.) I'm not using the GNUnet configuration as my own, I always initialized the application using GNUNET_OS_init with application-specific values. The test.c file I attached to my first e-mail does do that too, following 0.23's new interface. The issue is that GNUNET_CONFIGURATION_default() also *loaded* the actual GNUnet configuration, while the new current method expects a call to GNUNET_CONFIGURATION_load with a NULL as its second argument after creating the object. Until Martin linked the gnunet-gtk commit I didn't know about the second step, because it wasn't mentioned anywhere and I was expecting to have a single call giving me a valid configuration I could use to connect to GNUnet, like GNUNET_CONFIGURATION_default(). Now that I know about it, it's trivial to fix my applications, but I'd argue it should've been explicitly mentioned in the changelog. Thank you, A.V. On 12/10/24 20:50, Martin Schanzenbach wrote: > To say it a bit more bluntly: Using the GNUnet configuration as your > own application's configuration was never a good idea. > After all, none of the paths actually belong to your application and > you probably should not mess with any of those. > > This is why you should pass your applications own ProjectData to > GNUNET_PROGRAM_run and friends. > > Of course it is understandable that you want to use GNUnet services and > connect to them. > That is why GNUnet's config is still available for you to use. > > You can check out gnunet-gtk on how that is supposed to happen now. > (Commit > https://git.gnunet.org/gnunet-gtk.git/commit/?id=2e31cdf347d2fe93b6d388693027771b94fa60ef) > > BR > Martin