aboutsummaryrefslogtreecommitdiff
path: root/src/escrow/escrow_api.c
diff options
context:
space:
mode:
authorjospaeth <spaethj@in.tum.de>2020-09-02 21:59:37 +0200
committerjospaeth <spaethj@in.tum.de>2020-09-02 21:59:37 +0200
commitc2a7a669d9c014b86d6e046f7d297fc5556d9fd4 (patch)
tree262f3504249e215b327d029fb202543bb7e3ddc6 /src/escrow/escrow_api.c
parent3fd3f3fbc9c2f83b3505d4aafe026817944e73c1 (diff)
downloadgnunet-c2a7a669d9c014b86d6e046f7d297fc5556d9fd4.tar.gz
gnunet-c2a7a669d9c014b86d6e046f7d297fc5556d9fd4.zip
ESCROW_get() does not need method (as it is stored in anchor)
Diffstat (limited to 'src/escrow/escrow_api.c')
-rw-r--r--src/escrow/escrow_api.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/escrow/escrow_api.c b/src/escrow/escrow_api.c
index 5d1701405..8cbe889d4 100644
--- a/src/escrow/escrow_api.c
+++ b/src/escrow/escrow_api.c
@@ -133,7 +133,7 @@ init_plugin (const struct GNUNET_ESCROW_Handle *h,
133 (void *)h->cfg); 133 (void *)h->cfg);
134 return anastasis_api; 134 return anastasis_api;
135 case GNUNET_ESCROW_KEY_NONE: // error case 135 case GNUNET_ESCROW_KEY_NONE: // error case
136 fprintf (stderr, "incorrect escrow method!"); 136 fprintf (stderr, "incorrect escrow method!\n");
137 return NULL; 137 return NULL;
138 } 138 }
139 // should never be reached 139 // should never be reached
@@ -320,7 +320,6 @@ handle_restore_key_result (void *cls)
320 * 320 *
321 * @param h the handle for the escrow component 321 * @param h the handle for the escrow component
322 * @param anchor the escrow anchor returned by the GNUNET_ESCROW_put method 322 * @param anchor the escrow anchor returned by the GNUNET_ESCROW_put method
323 * @param method the escrow method to use
324 * @param cb function to call with the restored ego on completion 323 * @param cb function to call with the restored ego on completion
325 * @param cb_cls closure for @a cb 324 * @param cb_cls closure for @a cb
326 * 325 *
@@ -329,7 +328,6 @@ handle_restore_key_result (void *cls)
329struct GNUNET_ESCROW_Operation * 328struct GNUNET_ESCROW_Operation *
330GNUNET_ESCROW_get (struct GNUNET_ESCROW_Handle *h, 329GNUNET_ESCROW_get (struct GNUNET_ESCROW_Handle *h,
331 const struct GNUNET_ESCROW_Anchor *anchor, 330 const struct GNUNET_ESCROW_Anchor *anchor,
332 enum GNUNET_ESCROW_Key_Escrow_Method method,
333 GNUNET_ESCROW_EgoContinuation cb, 331 GNUNET_ESCROW_EgoContinuation cb,
334 void *cb_cls) 332 void *cb_cls)
335{ 333{
@@ -339,12 +337,12 @@ GNUNET_ESCROW_get (struct GNUNET_ESCROW_Handle *h,
339 op = GNUNET_new (struct GNUNET_ESCROW_Operation); 337 op = GNUNET_new (struct GNUNET_ESCROW_Operation);
340 op->h = h; 338 op->h = h;
341 op->id = get_op_id (h); 339 op->id = get_op_id (h);
342 op->method = method; 340 op->method = anchor->method;
343 op->cb_get = cb; 341 op->cb_get = cb;
344 op->cb_cls = cb_cls; 342 op->cb_cls = cb_cls;
345 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);
346 344
347 api = init_plugin (h, method); 345 api = init_plugin (h, anchor->method);
348 op->plugin_op_wrap = api->restore_key (h, anchor, &handle_restore_key_result, op->id); 346 op->plugin_op_wrap = api->restore_key (h, anchor, &handle_restore_key_result, op->id);
349 347
350 return op; 348 return op;