aboutsummaryrefslogtreecommitdiff
path: root/src/testbed
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-03-22 17:33:00 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-03-22 17:33:00 +0000
commit8bcc7b48e6e2e07ee5ba4da0e0c93714c6698c4d (patch)
tree5c7e0e79e5b85c92ab4cc2a23a1c11321c73a6c6 /src/testbed
parent77164127c13ea285b40d2543de36d042fbc862c8 (diff)
downloadgnunet-8bcc7b48e6e2e07ee5ba4da0e0c93714c6698c4d.tar.gz
gnunet-8bcc7b48e6e2e07ee5ba4da0e0c93714c6698c4d.zip
-dead code
Diffstat (limited to 'src/testbed')
-rw-r--r--src/testbed/testbed_api.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c
index f806446cf..6bed65cee 100644
--- a/src/testbed/testbed_api.c
+++ b/src/testbed/testbed_api.c
@@ -158,18 +158,6 @@ struct ShutdownPeersData
158 158
159 159
160/** 160/**
161 * This variable is set to the operation that has been last marked as done. It
162 * is used to verify whether the state associated with an operation is valid
163 * after the first notify callback is called. Such checks are necessary for
164 * certain operations where we have 2 notify callbacks. Examples are
165 * OP_PEER_CREATE, OP_PEER_START/STOP, OP_OVERLAY_CONNECT.
166 *
167 * This variable should ONLY be used to compare; it is a dangling pointer!!
168 */
169static const struct GNUNET_TESTBED_Operation *const last_finished_operation_;
170
171
172/**
173 * An entry in the stack for keeping operations which are about to expire 161 * An entry in the stack for keeping operations which are about to expire
174 */ 162 */
175struct ExpireOperationEntry 163struct ExpireOperationEntry
@@ -359,7 +347,7 @@ handle_opsuccess (struct GNUNET_TESTBED_Controller *c,
359 { 347 {
360 if (NULL != c->cc) 348 if (NULL != c->cc)
361 c->cc (c->cc_cls, &event); 349 c->cc (c->cc_cls, &event);
362 if (GNUNET_NO == exop_check (event.op)) //(last_finished_operation == event.op) 350 if (GNUNET_NO == exop_check (event.op))
363 return GNUNET_YES; 351 return GNUNET_YES;
364 } 352 }
365 else 353 else
@@ -367,7 +355,7 @@ handle_opsuccess (struct GNUNET_TESTBED_Controller *c,
367 if (NULL != op_comp_cb) 355 if (NULL != op_comp_cb)
368 op_comp_cb (op_comp_cb_cls, event.op, NULL); 356 op_comp_cb (op_comp_cb_cls, event.op, NULL);
369 /* You could have marked the operation as done by now */ 357 /* You could have marked the operation as done by now */
370 GNUNET_break (GNUNET_NO == exop_check (event.op)); //(last_finished_operation == event.op); 358 GNUNET_break (GNUNET_NO == exop_check (event.op));
371 return GNUNET_YES; 359 return GNUNET_YES;
372} 360}
373 361
@@ -426,7 +414,7 @@ handle_peer_create_success (struct GNUNET_TESTBED_Controller *c,
426 if (NULL != cb) 414 if (NULL != cb)
427 cb (cls, peer, NULL); 415 cb (cls, peer, NULL);
428 /* You could have marked the operation as done by now */ 416 /* You could have marked the operation as done by now */
429 GNUNET_break (GNUNET_NO == exop_check (op)); //(last_finished_operation == op); 417 GNUNET_break (GNUNET_NO == exop_check (op));
430 return GNUNET_YES; 418 return GNUNET_YES;
431} 419}
432 420
@@ -506,7 +494,7 @@ handle_peer_event (struct GNUNET_TESTBED_Controller *c,
506 if (NULL != pcc) 494 if (NULL != pcc)
507 pcc (pcc_cls, NULL); 495 pcc (pcc_cls, NULL);
508 /* You could have marked the operation as done by now */ 496 /* You could have marked the operation as done by now */
509 GNUNET_break (GNUNET_NO == exop_check (event.op)); // (event.op == last_finished_operation); 497 GNUNET_break (GNUNET_NO == exop_check (event.op));
510 return GNUNET_YES; 498 return GNUNET_YES;
511} 499}
512 500
@@ -575,13 +563,13 @@ handle_peer_conevent (struct GNUNET_TESTBED_Controller *c,
575 { 563 {
576 if (NULL != c->cc) 564 if (NULL != c->cc)
577 c->cc (c->cc_cls, &event); 565 c->cc (c->cc_cls, &event);
578 if (GNUNET_NO == exop_check (event.op)) //(event.op == last_finished_operation) 566 if (GNUNET_NO == exop_check (event.op))
579 return GNUNET_YES; 567 return GNUNET_YES;
580 } 568 }
581 if (NULL != cb) 569 if (NULL != cb)
582 cb (cb_cls, opc->op, NULL); 570 cb (cb_cls, opc->op, NULL);
583 /* You could have marked the operation as done by now */ 571 /* You could have marked the operation as done by now */
584 GNUNET_break (GNUNET_NO == exop_check (event.op)); //(event.op == last_finished_operation); 572 GNUNET_break (GNUNET_NO == exop_check (event.op));
585 return GNUNET_YES; 573 return GNUNET_YES;
586} 574}
587 575
@@ -714,7 +702,7 @@ handle_op_fail_event (struct GNUNET_TESTBED_Controller *c,
714 event.details.operation_finished.generic = NULL; 702 event.details.operation_finished.generic = NULL;
715 exop_insert (event.op); 703 exop_insert (event.op);
716 c->cc (c->cc_cls, &event); 704 c->cc (c->cc_cls, &event);
717 if (GNUNET_NO == exop_check (event.op)) //(event.op == last_finished_operation) 705 if (GNUNET_NO == exop_check (event.op))
718 return GNUNET_YES; 706 return GNUNET_YES;
719 } 707 }
720 switch (opc->type) 708 switch (opc->type)
@@ -1894,8 +1882,6 @@ GNUNET_TESTBED_create_helper_init_msg_ (const char *trusted_ip,
1894void 1882void
1895GNUNET_TESTBED_operation_done (struct GNUNET_TESTBED_Operation *operation) 1883GNUNET_TESTBED_operation_done (struct GNUNET_TESTBED_Operation *operation)
1896{ 1884{
1897 *((const struct GNUNET_TESTBED_Operation **) &last_finished_operation_) =
1898 operation;
1899 (void) exop_check (operation); 1885 (void) exop_check (operation);
1900 GNUNET_TESTBED_operation_release_ (operation); 1886 GNUNET_TESTBED_operation_release_ (operation);
1901} 1887}