diff options
Diffstat (limited to 'src/escrow')
-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 |