multiple operation queues for an operation
[oweals/gnunet.git] / src / testbed / testbed_api.c
index fdb0b406fb777b082ab90aae1440a0c9ad430967..c55e7373a00bc72ded931b034ce82b07ecb5d558 100644 (file)
@@ -724,13 +724,13 @@ handle_op_fail_event (struct GNUNET_TESTBED_Controller *c,
     LOG_DEBUG ("Operation not found\n");
     return GNUNET_YES;
   }
-  GNUNET_CONTAINER_DLL_remove (opc->c->ocq_head, opc->c->ocq_tail, opc);
   if (OP_FORWARDED == opc->type)
   {
     handle_forwarded_operation_msg (c, opc,
                                    (const struct GNUNET_MessageHeader *) msg);
     return GNUNET_YES;
   }
+  GNUNET_CONTAINER_DLL_remove (opc->c->ocq_head, opc->c->ocq_tail, opc);
   opc->state = OPC_STATE_FINISHED;
   emsg = GNUNET_TESTBED_parse_error_string_ (msg);
   if (NULL == emsg)
@@ -1884,6 +1884,7 @@ GNUNET_TESTBED_controller_link_2_ (void *op_cls,
                                         &oprelease_link_controllers);
   GNUNET_TESTBED_operation_queue_insert_ (master->opq_parallel_operations,
                                           opc->op);
+  GNUNET_TESTBED_operation_begin_wait_ (opc->op);
   return opc->op;
 }
 
@@ -1934,7 +1935,6 @@ GNUNET_TESTBED_controller_link_2 (void *op_cls,
                                             slave_host_id,
                                             sxcfg, sxcfg_size,
                                             scfg_size, is_subordinate);
-  GNUNET_break (0);
 }
 
 
@@ -2104,6 +2104,7 @@ GNUNET_TESTBED_get_slave_config_ (void *op_cls,
                                         &oprelease_get_slave_config);
   GNUNET_TESTBED_operation_queue_insert_ (master->opq_parallel_operations,
                                          opc->op); 
+  GNUNET_TESTBED_operation_begin_wait_ (opc->op);
   return opc->op;
 }