[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: Load GNSRECORD plugins within GNUnet's c
From: |
gnunet |
Subject: |
[gnunet] branch master updated: Load GNSRECORD plugins within GNUnet's context |
Date: |
Wed, 15 Jul 2020 20:20:16 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 9bb2c1e31 Load GNSRECORD plugins within GNUnet's context
9bb2c1e31 is described below
commit 9bb2c1e3183bbdd6554fe51c0b0a3e90022b77e1
Author: Alessio Vanni <vannilla@firemail.cc>
AuthorDate: Wed Jul 15 17:21:39 2020 +0200
Load GNSRECORD plugins within GNUnet's context
When applications set a new project data structure using `GNUNET_OS_init',
the
plugin loader will look into a different path for plugins, instead of using
GNUnet's installation path.
Since applications don't normally come with the default DNS/GNS plugins for
GNSRECORD, the consequence is that GNSRECORD will always fail when operating
on a record from GNS.
Signed-off-by: Christian Grothoff <christian@grothoff.org>
---
src/gnsrecord/gnsrecord.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/gnsrecord/gnsrecord.c b/src/gnsrecord/gnsrecord.c
index c6ebd7c29..3ce10473b 100644
--- a/src/gnsrecord/gnsrecord.c
+++ b/src/gnsrecord/gnsrecord.c
@@ -102,8 +102,15 @@ init ()
if (1 == once)
return;
once = 1;
+ struct GNUNET_OS_ProjectData *pd = GNUNET_OS_project_data_get ();
+ struct GNUNET_OS_ProjectData *dpd = GNUNET_OS_project_data_default ();
+
+ if (pd != dpd)
+ GNUNET_OS_init(dpd);
GNUNET_PLUGIN_load_all ("libgnunet_plugin_gnsrecord_", NULL,
&add_plugin, NULL);
+ if (pd != dpd)
+ GNUNET_OS_init(pd);
}
@@ -114,6 +121,11 @@ void __attribute__ ((destructor))
GNSRECORD_fini ()
{
struct Plugin *plugin;
+ struct GNUNET_OS_ProjectData *pd = GNUNET_OS_project_data_get ();
+ struct GNUNET_OS_ProjectData *dpd = GNUNET_OS_project_data_default ();
+
+ if (pd != dpd)
+ GNUNET_OS_init(dpd);
for (unsigned int i = 0; i < num_plugins; i++)
{
@@ -125,6 +137,10 @@ GNSRECORD_fini ()
GNUNET_free (plugin);
}
GNUNET_free (gns_plugins);
+
+ if (pd != dpd)
+ GNUNET_OS_init(dpd);
+
gns_plugins = NULL;
once = 0;
num_plugins = 0;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: Load GNSRECORD plugins within GNUnet's context,
gnunet <=