aboutsummaryrefslogtreecommitdiff
path: root/src/escrow/escrow_api.c
diff options
context:
space:
mode:
authorjospaeth <spaethj@in.tum.de>2020-08-03 17:50:14 +0200
committerjospaeth <spaethj@in.tum.de>2020-08-03 17:50:14 +0200
commitaaf439f8ca0dfb6ae503e3e4f7545c98f4e43d5a (patch)
treeb91c876d02bad573072c422896ba935dcb4ba666 /src/escrow/escrow_api.c
parent2822c5af3ef8f29ac2b5727ee3c13c6338852e58 (diff)
downloadgnunet-aaf439f8ca0dfb6ae503e3e4f7545c98f4e43d5a.tar.gz
gnunet-aaf439f8ca0dfb6ae503e3e4f7545c98f4e43d5a.zip
minor fixes, test structure
Diffstat (limited to 'src/escrow/escrow_api.c')
-rw-r--r--src/escrow/escrow_api.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/escrow/escrow_api.c b/src/escrow/escrow_api.c
index 5be53e713..5b57f9244 100644
--- a/src/escrow/escrow_api.c
+++ b/src/escrow/escrow_api.c
@@ -178,7 +178,7 @@ GNUNET_ESCROW_fini (struct GNUNET_ESCROW_Handle *h)
178void 178void
179handle_start_escrow_result (void *cls) 179handle_start_escrow_result (void *cls)
180{ 180{
181 struct GNUNET_ESCROW_Plugin_AnchorContinuationWrapper *w = cls; 181 struct ESCROW_Plugin_AnchorContinuationWrapper *w = cls;
182 struct GNUNET_ESCROW_Operation *op; 182 struct GNUNET_ESCROW_Operation *op;
183 183
184 for (op = w->h->op_head; NULL != op; op = op->next) 184 for (op = w->h->op_head; NULL != op; op = op->next)
@@ -206,7 +206,6 @@ handle_start_escrow_result (void *cls)
206 * @param ego the identity ego to put in escrow 206 * @param ego the identity ego to put in escrow
207 * @param method the escrow method to use 207 * @param method the escrow method to use
208 * @param cb function to call with the escrow anchor on completion 208 * @param cb function to call with the escrow anchor on completion
209 * @param cb_cls closure for @a cb
210 * 209 *
211 * @return handle to abort the operation 210 * @return handle to abort the operation
212 */ 211 */
@@ -214,8 +213,7 @@ struct GNUNET_ESCROW_Operation *
214GNUNET_ESCROW_put (struct GNUNET_ESCROW_Handle *h, 213GNUNET_ESCROW_put (struct GNUNET_ESCROW_Handle *h,
215 const struct GNUNET_IDENTITY_Ego *ego, 214 const struct GNUNET_IDENTITY_Ego *ego,
216 enum GNUNET_ESCROW_Key_Escrow_Method method, 215 enum GNUNET_ESCROW_Key_Escrow_Method method,
217 GNUNET_ESCROW_AnchorContinuation cb, 216 GNUNET_ESCROW_AnchorContinuation cb)
218 void *cb_cls)
219{ 217{
220 struct GNUNET_ESCROW_Operation *op; 218 struct GNUNET_ESCROW_Operation *op;
221 const struct GNUNET_ESCROW_KeyPluginFunctions *api; 219 const struct GNUNET_ESCROW_KeyPluginFunctions *api;
@@ -224,7 +222,6 @@ GNUNET_ESCROW_put (struct GNUNET_ESCROW_Handle *h,
224 op->h = h; 222 op->h = h;
225 op->method = method; 223 op->method = method;
226 op->cb_put = cb; 224 op->cb_put = cb;
227 op->cb_cls = cb_cls;
228 GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); 225 GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op);
229 226
230 api = init_plugin (h, method); 227 api = init_plugin (h, method);
@@ -237,7 +234,7 @@ GNUNET_ESCROW_put (struct GNUNET_ESCROW_Handle *h,
237static void 234static void
238handle_restore_key_result (void *cls) 235handle_restore_key_result (void *cls)
239{ 236{
240 struct GNUNET_ESCROW_Plugin_EgoContinuationWrapper *w = cls; 237 struct ESCROW_Plugin_EgoContinuationWrapper *w = cls;
241 struct GNUNET_ESCROW_Operation *op; 238 struct GNUNET_ESCROW_Operation *op;
242 239
243 for (op = w->h->op_head; NULL != op; op = op->next) 240 for (op = w->h->op_head; NULL != op; op = op->next)
@@ -266,7 +263,6 @@ handle_restore_key_result (void *cls)
266 * @param egoName the name of the ego to get back 263 * @param egoName the name of the ego to get back
267 * @param method the escrow method to use 264 * @param method the escrow method to use
268 * @param cb function to call with the restored ego on completion 265 * @param cb function to call with the restored ego on completion
269 * @param cb_cls closure for @a cb
270 * 266 *
271 * @return handle to abort the operation 267 * @return handle to abort the operation
272 */ 268 */
@@ -275,8 +271,7 @@ GNUNET_ESCROW_get (struct GNUNET_ESCROW_Handle *h,
275 struct GNUNET_ESCROW_Anchor *escrowAnchor, 271 struct GNUNET_ESCROW_Anchor *escrowAnchor,
276 char *egoName, 272 char *egoName,
277 enum GNUNET_ESCROW_Key_Escrow_Method method, 273 enum GNUNET_ESCROW_Key_Escrow_Method method,
278 GNUNET_ESCROW_EgoContinuation cb, 274 GNUNET_ESCROW_EgoContinuation cb)
279 void *cb_cls)
280{ 275{
281 struct GNUNET_ESCROW_Operation *op; 276 struct GNUNET_ESCROW_Operation *op;
282 const struct GNUNET_ESCROW_KeyPluginFunctions *api; 277 const struct GNUNET_ESCROW_KeyPluginFunctions *api;
@@ -285,7 +280,6 @@ GNUNET_ESCROW_get (struct GNUNET_ESCROW_Handle *h,
285 op->h = h; 280 op->h = h;
286 op->method = method; 281 op->method = method;
287 op->cb_get = cb; 282 op->cb_get = cb;
288 op->cb_cls = cb_cls;
289 GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); 283 GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op);
290 284
291 api = init_plugin (h, method); 285 api = init_plugin (h, method);
@@ -298,7 +292,7 @@ GNUNET_ESCROW_get (struct GNUNET_ESCROW_Handle *h,
298void 292void
299handle_verify_escrow_result (void *cls) 293handle_verify_escrow_result (void *cls)
300{ 294{
301 struct GNUNET_ESCROW_Plugin_VerifyContinuationWrapper *w = cls; 295 struct ESCROW_Plugin_VerifyContinuationWrapper *w = cls;
302 struct GNUNET_ESCROW_Operation *op; 296 struct GNUNET_ESCROW_Operation *op;
303 297
304 for (op = w->h->op_head; NULL != op; op = op->next) 298 for (op = w->h->op_head; NULL != op; op = op->next)
@@ -329,7 +323,6 @@ handle_verify_escrow_result (void *cls)
329 * @param escrowAnchor the escrow anchor returned by the GNUNET_ESCROW_put method 323 * @param escrowAnchor the escrow anchor returned by the GNUNET_ESCROW_put method
330 * @param method the escrow method to use 324 * @param method the escrow method to use
331 * @param cb function to call with the verification result on completion 325 * @param cb function to call with the verification result on completion
332 * @param cb_cls closure for @a cb
333 * 326 *
334 * @return handle to abort the operation 327 * @return handle to abort the operation
335 */ 328 */
@@ -338,8 +331,7 @@ GNUNET_ESCROW_verify (struct GNUNET_ESCROW_Handle *h,
338 const struct GNUNET_IDENTITY_Ego *ego, 331 const struct GNUNET_IDENTITY_Ego *ego,
339 struct GNUNET_ESCROW_Anchor *escrowAnchor, 332 struct GNUNET_ESCROW_Anchor *escrowAnchor,
340 enum GNUNET_ESCROW_Key_Escrow_Method method, 333 enum GNUNET_ESCROW_Key_Escrow_Method method,
341 GNUNET_ESCROW_VerifyContinuation cb, 334 GNUNET_ESCROW_VerifyContinuation cb)
342 void *cb_cls)
343{ 335{
344 struct GNUNET_ESCROW_Operation *op; 336 struct GNUNET_ESCROW_Operation *op;
345 const struct GNUNET_ESCROW_KeyPluginFunctions *api; 337 const struct GNUNET_ESCROW_KeyPluginFunctions *api;
@@ -348,7 +340,6 @@ GNUNET_ESCROW_verify (struct GNUNET_ESCROW_Handle *h,
348 op->h = h; 340 op->h = h;
349 op->method = method; 341 op->method = method;
350 op->cb_verify = cb; 342 op->cb_verify = cb;
351 op->cb_cls = cb_cls;
352 GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op); 343 GNUNET_CONTAINER_DLL_insert_tail (h->op_head, h->op_tail, op);
353 344
354 api = init_plugin (h, method); 345 api = init_plugin (h, method);