aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/testbed_api_operations.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testbed/testbed_api_operations.c')
-rw-r--r--src/testbed/testbed_api_operations.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/testbed/testbed_api_operations.c b/src/testbed/testbed_api_operations.c
index fc5da29b5..72d1733c9 100644
--- a/src/testbed/testbed_api_operations.c
+++ b/src/testbed/testbed_api_operations.c
@@ -635,7 +635,7 @@ recheck_waiting (struct OperationQueue *opq)
635 struct QueueEntry *entry2; 635 struct QueueEntry *entry2;
636 636
637 entry = opq->wq_head; 637 entry = opq->wq_head;
638 while ( (NULL != entry) && (opq->active < opq->max_active) ) 638 while (NULL != entry)
639 { 639 {
640 entry2 = entry->next; 640 entry2 = entry->next;
641 check_readiness (entry->op); 641 check_readiness (entry->op);
@@ -741,8 +741,20 @@ GNUNET_TESTBED_operation_begin_wait_ (struct GNUNET_TESTBED_Operation *op)
741void 741void
742GNUNET_TESTBED_operation_inactivate_ (struct GNUNET_TESTBED_Operation *op) 742GNUNET_TESTBED_operation_inactivate_ (struct GNUNET_TESTBED_Operation *op)
743{ 743{
744 struct OperationQueue **queues;
745 size_t ms;
746 unsigned int nqueues;
747 unsigned int i;
748
744 GNUNET_assert (OP_STATE_STARTED == op->state); 749 GNUNET_assert (OP_STATE_STARTED == op->state);
745 change_state (op, OP_STATE_INACTIVE); 750 change_state (op, OP_STATE_INACTIVE);
751 nqueues = op->nqueues;
752 ms = sizeof (struct OperationQueue *) * nqueues;
753 queues = GNUNET_malloc (ms);
754 GNUNET_assert (NULL != (queues = memcpy (queues, op->queues, ms)));
755 for (i = 0; i < nqueues; i++)
756 recheck_waiting (queues[i]);
757 GNUNET_free (queues);
746} 758}
747 759
748 760
@@ -756,6 +768,7 @@ GNUNET_TESTBED_operation_inactivate_ (struct GNUNET_TESTBED_Operation *op)
756void 768void
757GNUNET_TESTBED_operation_activate_ (struct GNUNET_TESTBED_Operation *op) 769GNUNET_TESTBED_operation_activate_ (struct GNUNET_TESTBED_Operation *op)
758{ 770{
771
759 GNUNET_assert (OP_STATE_INACTIVE == op->state); 772 GNUNET_assert (OP_STATE_INACTIVE == op->state);
760 change_state (op, OP_STATE_STARTED); 773 change_state (op, OP_STATE_STARTED);
761} 774}