diff options
author | jospaeth <spaethj@in.tum.de> | 2020-07-13 19:09:17 +0200 |
---|---|---|
committer | jospaeth <spaethj@in.tum.de> | 2020-07-13 19:09:17 +0200 |
commit | 122f2979146c6068cbaf189560f196e4a3323801 (patch) | |
tree | 48c9c7bfd3d5e491f413e160607e429adae70e0a /src/escrow/escrow_api.c | |
parent | 9916fbea6c32518329ff95f07e6b9818490f9eae (diff) | |
download | gnunet-122f2979146c6068cbaf189560f196e4a3323801.tar.gz gnunet-122f2979146c6068cbaf189560f196e4a3323801.zip |
unload plugins
Diffstat (limited to 'src/escrow/escrow_api.c')
-rw-r--r-- | src/escrow/escrow_api.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/escrow/escrow_api.c b/src/escrow/escrow_api.c index 748ab2044..b293c05a5 100644 --- a/src/escrow/escrow_api.c +++ b/src/escrow/escrow_api.c | |||
@@ -112,6 +112,41 @@ init_plugin (enum GNUNET_ESCROW_Key_Escrow_Method method) | |||
112 | 112 | ||
113 | 113 | ||
114 | /** | 114 | /** |
115 | * Unload all loaded plugins on destruction. | ||
116 | */ | ||
117 | void __attribute__ ((destructor)) | ||
118 | GNUNET_ESCROW_fini_plugins () | ||
119 | { | ||
120 | if (GNUNET_YES == plaintext_initialized) | ||
121 | { | ||
122 | plaintext_initialized = GNUNET_NO; | ||
123 | GNUNET_break (NULL == | ||
124 | GNUNET_PLUGIN_unload ("libgnunet_plugin_escrow_plaintext", | ||
125 | plaintext_api)); | ||
126 | plaintext_api = NULL; | ||
127 | } | ||
128 | |||
129 | if (GNUNET_YES == gns_initialized) | ||
130 | { | ||
131 | gns_initialized = GNUNET_NO; | ||
132 | GNUNET_break (NULL == | ||
133 | GNUNET_PLUGIN_unload ("libgnunet_plugin_escrow_gns", | ||
134 | gns_api)); | ||
135 | gns_api = NULL; | ||
136 | } | ||
137 | |||
138 | if (GNUNET_YES == anastasis_initialized) | ||
139 | { | ||
140 | anastasis_initialized = GNUNET_NO; | ||
141 | GNUNET_break (NULL == | ||
142 | GNUNET_PLUGIN_unload ("libgnunet_plugin_escrow_anastasis", | ||
143 | anastasis_api)); | ||
144 | anastasis_api = NULL; | ||
145 | } | ||
146 | } | ||
147 | |||
148 | |||
149 | /** | ||
115 | * Put some data in escrow using the specified escrow method | 150 | * Put some data in escrow using the specified escrow method |
116 | * | 151 | * |
117 | * @param ego the identity ego to put in escrow | 152 | * @param ego the identity ego to put in escrow |