diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-09-16 15:24:21 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-09-16 15:24:21 +0000 |
commit | 91567043727449e9b9e375201f7bf6aeaf9fde27 (patch) | |
tree | 1c35af58b3b1fd42dda76b6576352780fe8363e5 /src/vpn | |
parent | c8dce9e10f91f76095eb9620f9e85af6dcd2b1d3 (diff) | |
download | gnunet-91567043727449e9b9e375201f7bf6aeaf9fde27.tar.gz gnunet-91567043727449e9b9e375201f7bf6aeaf9fde27.zip |
c3133
Diffstat (limited to 'src/vpn')
-rw-r--r-- | src/vpn/gnunet-daemon-exit.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/vpn/gnunet-daemon-exit.c b/src/vpn/gnunet-daemon-exit.c index 7cd6d98d9..b6d375e82 100644 --- a/src/vpn/gnunet-daemon-exit.c +++ b/src/vpn/gnunet-daemon-exit.c | |||
@@ -1397,6 +1397,7 @@ connect_to_mesh () | |||
1397 | mesh_handle = GNUNET_MESH_connect (cfg, NULL, NULL, handlers, apptypes); | 1397 | mesh_handle = GNUNET_MESH_connect (cfg, NULL, NULL, handlers, apptypes); |
1398 | } | 1398 | } |
1399 | 1399 | ||
1400 | |||
1400 | /** | 1401 | /** |
1401 | * @brief Main function that will be run by the scheduler. | 1402 | * @brief Main function that will be run by the scheduler. |
1402 | * | 1403 | * |
@@ -1422,19 +1423,22 @@ run (void *cls, char *const *args __attribute__ ((unused)), const char *cfgfile | |||
1422 | udp_services = GNUNET_CONTAINER_multihashmap_create (65536); | 1423 | udp_services = GNUNET_CONTAINER_multihashmap_create (65536); |
1423 | tcp_services = GNUNET_CONTAINER_multihashmap_create (65536); | 1424 | tcp_services = GNUNET_CONTAINER_multihashmap_create (65536); |
1424 | 1425 | ||
1425 | GNUNET_CONFIGURATION_get_value_number (cfg, "exit", "MAX_UDP_CONNECTIONS", | 1426 | if (GNUNET_OK != |
1426 | &max_udp_connections); | 1427 | GNUNET_CONFIGURATION_get_value_number (cfg, "exit", "MAX_UDP_CONNECTIONS", |
1427 | GNUNET_CONFIGURATION_get_value_number (cfg, "exit", "MAX_TCP_CONNECTIONS", | 1428 | &max_udp_connections)) |
1428 | &max_tcp_connections); | 1429 | max_udp_connections = 1024; |
1429 | 1430 | if (GNUNET_OK != | |
1431 | GNUNET_CONFIGURATION_get_value_number (cfg, "exit", "MAX_TCP_CONNECTIONS", | ||
1432 | &max_tcp_connections)) | ||
1433 | max_tcp_connections = 256; | ||
1430 | GNUNET_CONFIGURATION_iterate_sections (cfg, read_service_conf, NULL); | 1434 | GNUNET_CONFIGURATION_iterate_sections (cfg, read_service_conf, NULL); |
1431 | |||
1432 | GNUNET_SCHEDULER_add_now (start_helper_and_schedule, NULL); | 1435 | GNUNET_SCHEDULER_add_now (start_helper_and_schedule, NULL); |
1433 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup, cls); | 1436 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup, cls); |
1434 | } | 1437 | } |
1435 | 1438 | ||
1439 | |||
1436 | /** | 1440 | /** |
1437 | * The main function to obtain template from gnunetd. | 1441 | * The main function |
1438 | * | 1442 | * |
1439 | * @param argc number of arguments from the command line | 1443 | * @param argc number of arguments from the command line |
1440 | * @param argv command line arguments | 1444 | * @param argv command line arguments |
@@ -1448,8 +1452,10 @@ main (int argc, char *const *argv) | |||
1448 | }; | 1452 | }; |
1449 | 1453 | ||
1450 | return (GNUNET_OK == | 1454 | return (GNUNET_OK == |
1451 | GNUNET_PROGRAM_run (argc, argv, "exit", gettext_noop ("help text"), | 1455 | GNUNET_PROGRAM_run (argc, argv, "gnunet-daemon-exit", |
1456 | gettext_noop ("Daemon to run to provide an IP exit node for the VPN"), | ||
1452 | options, &run, NULL)) ? ret : 1; | 1457 | options, &run, NULL)) ? ret : 1; |
1453 | } | 1458 | } |
1454 | 1459 | ||
1460 | |||
1455 | /* end of gnunet-daemon-exit.c */ | 1461 | /* end of gnunet-daemon-exit.c */ |