aboutsummaryrefslogtreecommitdiff
path: root/src/gnsrecord/gnsrecord.c
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2020-07-21 12:30:37 +0200
committert3sserakt <t3ss@posteo.de>2020-07-21 12:30:37 +0200
commit5fa1c7dc809aebb55ef062cb3a2757c54eb6b7e7 (patch)
treec26167460724fea683ef51a88ffd93d1fa830412 /src/gnsrecord/gnsrecord.c
parent17d84245fdfeeb1a6da4ffb97898903cb55f702c (diff)
parent7f4ddbcab8598e3d5e29c23ce883cdfa664408f1 (diff)
downloadgnunet-5fa1c7dc809aebb55ef062cb3a2757c54eb6b7e7.tar.gz
gnunet-5fa1c7dc809aebb55ef062cb3a2757c54eb6b7e7.zip
Merge branch 'master' of ssh://gnunet.org/gnunet
Diffstat (limited to 'src/gnsrecord/gnsrecord.c')
-rw-r--r--src/gnsrecord/gnsrecord.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/gnsrecord/gnsrecord.c b/src/gnsrecord/gnsrecord.c
index 82fb71c06..8d5a6d95b 100644
--- a/src/gnsrecord/gnsrecord.c
+++ b/src/gnsrecord/gnsrecord.c
@@ -102,8 +102,15 @@ init ()
102 if (1 == once) 102 if (1 == once)
103 return; 103 return;
104 once = 1; 104 once = 1;
105 const struct GNUNET_OS_ProjectData *pd = GNUNET_OS_project_data_get ();
106 const struct GNUNET_OS_ProjectData *dpd = GNUNET_OS_project_data_default ();
107
108 if (pd != dpd)
109 GNUNET_OS_init (dpd);
105 GNUNET_PLUGIN_load_all ("libgnunet_plugin_gnsrecord_", NULL, 110 GNUNET_PLUGIN_load_all ("libgnunet_plugin_gnsrecord_", NULL,
106 &add_plugin, NULL); 111 &add_plugin, NULL);
112 if (pd != dpd)
113 GNUNET_OS_init (pd);
107} 114}
108 115
109 116
@@ -114,6 +121,11 @@ void __attribute__ ((destructor))
114GNSRECORD_fini () 121GNSRECORD_fini ()
115{ 122{
116 struct Plugin *plugin; 123 struct Plugin *plugin;
124 const struct GNUNET_OS_ProjectData *pd = GNUNET_OS_project_data_get ();
125 const struct GNUNET_OS_ProjectData *dpd = GNUNET_OS_project_data_default ();
126
127 if (pd != dpd)
128 GNUNET_OS_init (dpd);
117 129
118 for (unsigned int i = 0; i < num_plugins; i++) 130 for (unsigned int i = 0; i < num_plugins; i++)
119 { 131 {
@@ -124,7 +136,11 @@ GNSRECORD_fini ()
124 GNUNET_free (plugin->library_name); 136 GNUNET_free (plugin->library_name);
125 GNUNET_free (plugin); 137 GNUNET_free (plugin);
126 } 138 }
127 GNUNET_free_non_null (gns_plugins); 139 GNUNET_free (gns_plugins);
140
141 if (pd != dpd)
142 GNUNET_OS_init (pd);
143
128 gns_plugins = NULL; 144 gns_plugins = NULL;
129 once = 0; 145 once = 0;
130 num_plugins = 0; 146 num_plugins = 0;