aboutsummaryrefslogtreecommitdiff
path: root/src/escrow/plugin_escrow_gns.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/plugin_escrow_gns.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/plugin_escrow_gns.c')
-rw-r--r--src/escrow/plugin_escrow_gns.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/escrow/plugin_escrow_gns.c b/src/escrow/plugin_escrow_gns.c
index cf12602ca..422a3849e 100644
--- a/src/escrow/plugin_escrow_gns.c
+++ b/src/escrow/plugin_escrow_gns.c
@@ -466,6 +466,7 @@ start_cont (void *cls)
466 struct ESCROW_GnsPluginOperation *p_op; 466 struct ESCROW_GnsPluginOperation *p_op;
467 467
468 p_op = (struct ESCROW_GnsPluginOperation*)plugin_op_wrap->plugin_op; 468 p_op = (struct ESCROW_GnsPluginOperation*)plugin_op_wrap->plugin_op;
469 p_op->sched_task = NULL;
469 p_op->cont (p_op->anchor_wrap); 470 p_op->cont (p_op->anchor_wrap);
470 471
471 cleanup_plugin_operation (plugin_op_wrap); 472 cleanup_plugin_operation (plugin_op_wrap);
@@ -479,6 +480,7 @@ verify_cont (void *cls)
479 struct ESCROW_GnsPluginOperation *p_op; 480 struct ESCROW_GnsPluginOperation *p_op;
480 481
481 p_op = (struct ESCROW_GnsPluginOperation*)plugin_op_wrap->plugin_op; 482 p_op = (struct ESCROW_GnsPluginOperation*)plugin_op_wrap->plugin_op;
483 p_op->sched_task = NULL;
482 p_op->cont (p_op->verify_wrap); 484 p_op->cont (p_op->verify_wrap);
483 485
484 cleanup_plugin_operation (plugin_op_wrap); 486 cleanup_plugin_operation (plugin_op_wrap);
@@ -492,6 +494,7 @@ handle_restore_error (void *cls)
492 struct ESCROW_GnsPluginOperation *p_op; 494 struct ESCROW_GnsPluginOperation *p_op;
493 495
494 p_op = (struct ESCROW_GnsPluginOperation*)plugin_op_wrap->plugin_op; 496 p_op = (struct ESCROW_GnsPluginOperation*)plugin_op_wrap->plugin_op;
497 p_op->sched_task = NULL;
495 p_op->cont (p_op->ego_wrap); 498 p_op->cont (p_op->ego_wrap);
496 499
497 cleanup_plugin_operation (plugin_op_wrap); 500 cleanup_plugin_operation (plugin_op_wrap);
@@ -1456,10 +1459,17 @@ verify_gns_key_escrow (struct GNUNET_ESCROW_Handle *h,
1456 p_op->sched_task = GNUNET_SCHEDULER_add_now (&verify_cont, plugin_op_wrap); 1459 p_op->sched_task = GNUNET_SCHEDULER_add_now (&verify_cont, plugin_op_wrap);
1457 return plugin_op_wrap; 1460 return plugin_op_wrap;
1458 } 1461 }
1462 if (GNUNET_ESCROW_KEY_GNS != anchor->method)
1463 {
1464 w->verificationResult = GNUNET_ESCROW_INVALID;
1465 w->emsg = _ ("This anchor was not created using GNS escrow!\n");
1466 p_op->sched_task = GNUNET_SCHEDULER_add_now (&verify_cont, plugin_op_wrap);
1467 return plugin_op_wrap;
1468 }
1459 if (0 != strcmp (ego->name, anchor->egoName)) 1469 if (0 != strcmp (ego->name, anchor->egoName))
1460 { 1470 {
1461 w->verificationResult = GNUNET_ESCROW_INVALID; 1471 w->verificationResult = GNUNET_ESCROW_INVALID;
1462 w->emsg = _ ("This anchor was not created when putting ego that in escrow!\n"); 1472 w->emsg = _ ("This anchor was not created when putting that ego in escrow!\n");
1463 p_op->sched_task = GNUNET_SCHEDULER_add_now (&verify_cont, plugin_op_wrap); 1473 p_op->sched_task = GNUNET_SCHEDULER_add_now (&verify_cont, plugin_op_wrap);
1464 return plugin_op_wrap; 1474 return plugin_op_wrap;
1465 } 1475 }