diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-02-14 12:33:43 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-02-14 12:33:43 +0000 |
commit | 277f2ffeed022c1de410776902858d1edeaee910 (patch) | |
tree | 8ca3ec07dbf8dd783947e3f04ed25e270ad22457 /src/testbed/testbed_api_peers.c | |
parent | a6492d071ad383beff300d825740fd9bfe41c34e (diff) | |
download | gnunet-277f2ffeed022c1de410776902858d1edeaee910.tar.gz gnunet-277f2ffeed022c1de410776902858d1edeaee910.zip |
move parallel overlay connect operation queue from controller handle to host handle
Diffstat (limited to 'src/testbed/testbed_api_peers.c')
-rw-r--r-- | src/testbed/testbed_api_peers.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/testbed/testbed_api_peers.c b/src/testbed/testbed_api_peers.c index 908428a83..039922fae 100644 --- a/src/testbed/testbed_api_peers.c +++ b/src/testbed/testbed_api_peers.c | |||
@@ -340,7 +340,7 @@ opstart_overlay_connect (void *cls) | |||
340 | opc->state = OPC_STATE_STARTED; | 340 | opc->state = OPC_STATE_STARTED; |
341 | data = opc->data; | 341 | data = opc->data; |
342 | GNUNET_assert (NULL != data); | 342 | GNUNET_assert (NULL != data); |
343 | data->tslot_index = GNUNET_TESTBED_get_tslot_ (opc->c, data); | 343 | data->tslot_index = GNUNET_TESTBED_get_tslot_ (data->p1->host, data); |
344 | data->tstart = GNUNET_TIME_absolute_get (); | 344 | data->tstart = GNUNET_TIME_absolute_get (); |
345 | msg = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_OverlayConnectMessage)); | 345 | msg = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_OverlayConnectMessage)); |
346 | msg->header.size = | 346 | msg->header.size = |
@@ -373,13 +373,14 @@ oprelease_overlay_connect (void *cls) | |||
373 | case OPC_STATE_INIT: | 373 | case OPC_STATE_INIT: |
374 | break; | 374 | break; |
375 | case OPC_STATE_STARTED: | 375 | case OPC_STATE_STARTED: |
376 | (void) GNUNET_TESTBED_release_time_slot_ (opc->c, data->tslot_index, data); | 376 | (void) GNUNET_TESTBED_release_time_slot_ (data->p1->host, data->tslot_index, |
377 | data); | ||
377 | GNUNET_CONTAINER_DLL_remove (opc->c->ocq_head, opc->c->ocq_tail, opc); | 378 | GNUNET_CONTAINER_DLL_remove (opc->c->ocq_head, opc->c->ocq_tail, opc); |
378 | break; | 379 | break; |
379 | case OPC_STATE_FINISHED: | 380 | case OPC_STATE_FINISHED: |
380 | duration = GNUNET_TIME_absolute_get_duration (data->tstart); | 381 | duration = GNUNET_TIME_absolute_get_duration (data->tstart); |
381 | GNUNET_TESTBED_update_time_slot_ (opc->c, data->tslot_index, data, duration, | 382 | GNUNET_TESTBED_update_time_slot_ (data->p1->host, data->tslot_index, data, |
382 | data->failed); | 383 | duration, data->failed); |
383 | } | 384 | } |
384 | GNUNET_free (data); | 385 | GNUNET_free (data); |
385 | GNUNET_free (opc); | 386 | GNUNET_free (opc); |
@@ -693,9 +694,7 @@ GNUNET_TESTBED_overlay_connect (void *op_cls, | |||
693 | opc->op = | 694 | opc->op = |
694 | GNUNET_TESTBED_operation_create_ (opc, &opstart_overlay_connect, | 695 | GNUNET_TESTBED_operation_create_ (opc, &opstart_overlay_connect, |
695 | &oprelease_overlay_connect); | 696 | &oprelease_overlay_connect); |
696 | GNUNET_TESTBED_operation_queue_insert_ (opc-> | 697 | GNUNET_TESTBED_host_queue_oc (p1->host, opc->op); |
697 | c->opq_parallel_overlay_connect_operations, | ||
698 | opc->op); | ||
699 | GNUNET_TESTBED_operation_begin_wait_ (opc->op); | 698 | GNUNET_TESTBED_operation_begin_wait_ (opc->op); |
700 | return opc->op; | 699 | return opc->op; |
701 | } | 700 | } |