aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2012-08-25 10:29:17 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2012-08-25 10:29:17 +0000
commit9233abe82cdf18d40932d590f1c411dff47488e7 (patch)
tree69b9ca3cba9339fb6d5099c276643ef6d03c4930
parentd78b1ed8679e564865d86e8693939c2e9ff60c75 (diff)
downloadgnunet-9233abe82cdf18d40932d590f1c411dff47488e7.tar.gz
gnunet-9233abe82cdf18d40932d590f1c411dff47488e7.zip
operation queue renaming
-rw-r--r--src/testbed/testbed.conf.in3
-rw-r--r--src/testbed/testbed_api.c19
-rw-r--r--src/testbed/testbed_api.h4
-rw-r--r--src/testbed/testbed_api_peers.c16
4 files changed, 24 insertions, 18 deletions
diff --git a/src/testbed/testbed.conf.in b/src/testbed/testbed.conf.in
index bed5e7f78..94a8b21a5 100644
--- a/src/testbed/testbed.conf.in
+++ b/src/testbed/testbed.conf.in
@@ -10,4 +10,5 @@ ACCEPT_FROM6 = ::1;
10UNIXPATH = /tmp/gnunet-service-testbed.sock 10UNIXPATH = /tmp/gnunet-service-testbed.sock
11UNIX_MATCH_UID = YES 11UNIX_MATCH_UID = YES
12UNIX_MATCH_GID = YES 12UNIX_MATCH_GID = YES
13MAX_PARALLEL_PEER_CREATE = 1000 \ No newline at end of file 13MAX_PARALLEL_OPERATIONS = 1000
14MAX_PARALLEL_SERVICE_CONNECTIONS = 1000
diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c
index bf459b2bd..42167a5cb 100644
--- a/src/testbed/testbed_api.c
+++ b/src/testbed/testbed_api.c
@@ -1159,16 +1159,16 @@ GNUNET_TESTBED_controller_connect (const struct GNUNET_CONFIGURATION_Handle *cfg
1159 struct GNUNET_TESTBED_Controller *controller; 1159 struct GNUNET_TESTBED_Controller *controller;
1160 struct GNUNET_TESTBED_InitMessage *msg; 1160 struct GNUNET_TESTBED_InitMessage *msg;
1161 const char *controller_hostname; 1161 const char *controller_hostname;
1162 unsigned long long max_parallel_peer_create; 1162 unsigned long long max_parallel_operations;
1163 1163
1164 if (GNUNET_OK != 1164 if (GNUNET_OK !=
1165 GNUNET_CONFIGURATION_get_value_number (cfg, "testbed", 1165 GNUNET_CONFIGURATION_get_value_number (cfg, "testbed",
1166 "MAX_PARALLEL_PEER_CREATE", 1166 "MAX_PARALLEL_OPERATIONS",
1167 &max_parallel_peer_create)) 1167 &max_parallel_operations))
1168 { 1168 {
1169 GNUNET_break (0); 1169 GNUNET_break (0);
1170 return NULL; 1170 return NULL;
1171 } 1171 }
1172 controller = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_Controller)); 1172 controller = GNUNET_malloc (sizeof (struct GNUNET_TESTBED_Controller));
1173 controller->cc = cc; 1173 controller->cc = cc;
1174 controller->cc_cls = cc_cls; 1174 controller->cc_cls = cc_cls;
@@ -1198,9 +1198,9 @@ GNUNET_TESTBED_controller_connect (const struct GNUNET_CONFIGURATION_Handle *cfg
1198 GNUNET_assert (NULL != host); 1198 GNUNET_assert (NULL != host);
1199 GNUNET_TESTBED_mark_host_registered_at_ (host, controller); 1199 GNUNET_TESTBED_mark_host_registered_at_ (host, controller);
1200 controller->host = host; 1200 controller->host = host;
1201 controller->opq_peer_create = 1201 controller->opq_parallel_operations =
1202 GNUNET_TESTBED_operation_queue_create_ ((unsigned int) 1202 GNUNET_TESTBED_operation_queue_create_ ((unsigned int)
1203 max_parallel_peer_create); 1203 max_parallel_operations);
1204 controller_hostname = GNUNET_TESTBED_host_get_hostname_ (host); 1204 controller_hostname = GNUNET_TESTBED_host_get_hostname_ (host);
1205 if (NULL == controller_hostname) 1205 if (NULL == controller_hostname)
1206 controller_hostname = "127.0.0.1"; 1206 controller_hostname = "127.0.0.1";
@@ -1279,7 +1279,7 @@ GNUNET_TESTBED_controller_disconnect (struct GNUNET_TESTBED_Controller *controll
1279 GNUNET_CONFIGURATION_destroy (controller->cfg); 1279 GNUNET_CONFIGURATION_destroy (controller->cfg);
1280 if (GNUNET_YES == controller->aux_host) 1280 if (GNUNET_YES == controller->aux_host)
1281 GNUNET_TESTBED_host_destroy (controller->host); 1281 GNUNET_TESTBED_host_destroy (controller->host);
1282 GNUNET_TESTBED_operation_queue_destroy_ (controller->opq_peer_create); 1282 GNUNET_TESTBED_operation_queue_destroy_ (controller->opq_parallel_operations);
1283 GNUNET_free (controller); 1283 GNUNET_free (controller);
1284} 1284}
1285 1285
@@ -1424,7 +1424,8 @@ GNUNET_TESTBED_controller_link_2 (struct GNUNET_TESTBED_Controller *master,
1424 msg->operation_id = GNUNET_htonll (opc->id); 1424 msg->operation_id = GNUNET_htonll (opc->id);
1425 opc->op = GNUNET_TESTBED_operation_create_ (opc, &opstart_link_controllers, 1425 opc->op = GNUNET_TESTBED_operation_create_ (opc, &opstart_link_controllers,
1426 &oprelease_link_controllers); 1426 &oprelease_link_controllers);
1427 GNUNET_TESTBED_operation_queue_insert_ (master->opq_peer_create, opc->op); 1427 GNUNET_TESTBED_operation_queue_insert_ (master->opq_parallel_operations,
1428 opc->op);
1428 return opc->op; 1429 return opc->op;
1429} 1430}
1430 1431
@@ -1535,7 +1536,7 @@ GNUNET_TESTBED_overlay_write_topology_to_file (struct GNUNET_TESTBED_Controller
1535 */ 1536 */
1536struct GNUNET_TESTBED_HelperInit * 1537struct GNUNET_TESTBED_HelperInit *
1537GNUNET_TESTBED_create_helper_init_msg_ (const char *cname, 1538GNUNET_TESTBED_create_helper_init_msg_ (const char *cname,
1538 const struct GNUNET_CONFIGURATION_Handle *cfg) 1539 const struct GNUNET_CONFIGURATION_Handle *cfg)
1539{ 1540{
1540 struct GNUNET_TESTBED_HelperInit *msg; 1541 struct GNUNET_TESTBED_HelperInit *msg;
1541 char *config; 1542 char *config;
diff --git a/src/testbed/testbed_api.h b/src/testbed/testbed_api.h
index 625f3d1f6..89e6800d7 100644
--- a/src/testbed/testbed_api.h
+++ b/src/testbed/testbed_api.h
@@ -275,9 +275,9 @@ struct GNUNET_TESTBED_Controller
275 struct OperationContext *ocq_tail; 275 struct OperationContext *ocq_tail;
276 276
277 /** 277 /**
278 * Operation queue for simultaneous peer creations 278 * Operation queue for simultaneous operations
279 */ 279 */
280 struct OperationQueue *opq_peer_create; 280 struct OperationQueue *opq_parallel_operations;
281 281
282 /** 282 /**
283 * The operation id counter. use current value and increment 283 * The operation id counter. use current value and increment
diff --git a/src/testbed/testbed_api_peers.c b/src/testbed/testbed_api_peers.c
index 51ef66bec..25362df0d 100644
--- a/src/testbed/testbed_api_peers.c
+++ b/src/testbed/testbed_api_peers.c
@@ -408,7 +408,8 @@ GNUNET_TESTBED_peer_create_with_id_ (uint32_t unique_id,
408 opc->type = OP_PEER_CREATE; 408 opc->type = OP_PEER_CREATE;
409 opc->op = GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_create, 409 opc->op = GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_create,
410 &oprelease_peer_create); 410 &oprelease_peer_create);
411 GNUNET_TESTBED_operation_queue_insert_ (controller->opq_peer_create, opc->op); 411 GNUNET_TESTBED_operation_queue_insert_ (controller->opq_parallel_operations,
412 opc->op);
412 return opc->op; 413 return opc->op;
413} 414}
414 415
@@ -477,7 +478,8 @@ GNUNET_TESTBED_peer_start (struct GNUNET_TESTBED_Peer *peer)
477 opc->type = OP_PEER_START; 478 opc->type = OP_PEER_START;
478 opc->op = GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_start, 479 opc->op = GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_start,
479 &oprelease_peer_start); 480 &oprelease_peer_start);
480 GNUNET_TESTBED_operation_queue_insert_ (opc->c->opq_peer_create, opc->op); 481 GNUNET_TESTBED_operation_queue_insert_ (opc->c->opq_parallel_operations,
482 opc->op);
481 return opc->op; 483 return opc->op;
482} 484}
483 485
@@ -502,7 +504,8 @@ GNUNET_TESTBED_peer_stop (struct GNUNET_TESTBED_Peer *peer)
502 opc->type = OP_PEER_STOP; 504 opc->type = OP_PEER_STOP;
503 opc->op = GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_stop, 505 opc->op = GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_stop,
504 &oprelease_peer_stop); 506 &oprelease_peer_stop);
505 GNUNET_TESTBED_operation_queue_insert_ (opc->c->opq_peer_create, opc->op); 507 GNUNET_TESTBED_operation_queue_insert_ (opc->c->opq_parallel_operations,
508 opc->op);
506 return opc->op; 509 return opc->op;
507} 510}
508 511
@@ -532,7 +535,8 @@ GNUNET_TESTBED_peer_get_information (struct GNUNET_TESTBED_Peer *peer,
532 opc->id = opc->c->operation_counter++; 535 opc->id = opc->c->operation_counter++;
533 opc->op = GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_getinfo, 536 opc->op = GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_getinfo,
534 &oprelease_peer_getinfo); 537 &oprelease_peer_getinfo);
535 GNUNET_TESTBED_operation_queue_insert_ (opc->c->opq_peer_create, opc->op); 538 GNUNET_TESTBED_operation_queue_insert_ (opc->c->opq_parallel_operations,
539 opc->op);
536 return opc->op; 540 return opc->op;
537} 541}
538 542
@@ -576,7 +580,7 @@ GNUNET_TESTBED_peer_destroy (struct GNUNET_TESTBED_Peer *peer)
576 opc->type = OP_PEER_DESTROY; 580 opc->type = OP_PEER_DESTROY;
577 opc->op = GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_destroy, 581 opc->op = GNUNET_TESTBED_operation_create_ (opc, &opstart_peer_destroy,
578 &oprelease_peer_destroy); 582 &oprelease_peer_destroy);
579 GNUNET_TESTBED_operation_queue_insert_ (opc->c->opq_peer_create, 583 GNUNET_TESTBED_operation_queue_insert_ (opc->c->opq_parallel_operations,
580 opc->op); 584 opc->op);
581 return opc->op; 585 return opc->op;
582} 586}
@@ -638,7 +642,7 @@ GNUNET_TESTBED_overlay_connect (void *op_cls,
638 opc->type = OP_OVERLAY_CONNECT; 642 opc->type = OP_OVERLAY_CONNECT;
639 opc->op = GNUNET_TESTBED_operation_create_ (opc, &opstart_overlay_connect, 643 opc->op = GNUNET_TESTBED_operation_create_ (opc, &opstart_overlay_connect,
640 &oprelease_overlay_connect); 644 &oprelease_overlay_connect);
641 GNUNET_TESTBED_operation_queue_insert_ (opc->c->opq_peer_create, 645 GNUNET_TESTBED_operation_queue_insert_ (opc->c->opq_parallel_operations,
642 opc->op); 646 opc->op);
643 return opc->op; 647 return opc->op;
644} 648}