diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-02-28 14:35:13 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-02-28 14:35:13 +0000 |
commit | 0d94b5ea4c38d3a95975fe34cf8542d04e1bb68c (patch) | |
tree | 49ff8afde38bd679e8f62c266fd40983cc3c0a1b /src/arm | |
parent | 37079402ef1ba6e9a78d878d8d321e4d67c492ae (diff) | |
download | gnunet-0d94b5ea4c38d3a95975fe34cf8542d04e1bb68c.tar.gz gnunet-0d94b5ea4c38d3a95975fe34cf8542d04e1bb68c.zip |
-fix indentation, logging, i18n, doxygen
Diffstat (limited to 'src/arm')
-rw-r--r-- | src/arm/gnunet-service-arm.c | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index ee61c2999..2124749ca 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c | |||
@@ -1305,7 +1305,8 @@ sighandler_child_death () | |||
1305 | * @return #GNUNET_OK (continue) | 1305 | * @return #GNUNET_OK (continue) |
1306 | */ | 1306 | */ |
1307 | static void | 1307 | static void |
1308 | setup_service (void *cls, const char *section) | 1308 | setup_service (void *cls, |
1309 | const char *section) | ||
1309 | { | 1310 | { |
1310 | struct ServiceList *sl; | 1311 | struct ServiceList *sl; |
1311 | char *binary; | 1312 | char *binary; |
@@ -1353,10 +1354,13 @@ setup_service (void *cls, const char *section) | |||
1353 | } | 1354 | } |
1354 | config = NULL; | 1355 | config = NULL; |
1355 | if (( (GNUNET_OK != | 1356 | if (( (GNUNET_OK != |
1356 | GNUNET_CONFIGURATION_get_value_filename (cfg, section, "CONFIG", | 1357 | GNUNET_CONFIGURATION_get_value_filename (cfg, section, |
1358 | "CONFIG", | ||
1357 | &config)) && | 1359 | &config)) && |
1358 | (GNUNET_OK != | 1360 | (GNUNET_OK != |
1359 | GNUNET_CONFIGURATION_get_value_filename (cfg, "PATHS", "DEFAULTCONFIG", | 1361 | GNUNET_CONFIGURATION_get_value_filename (cfg, |
1362 | "PATHS", | ||
1363 | "DEFAULTCONFIG", | ||
1360 | &config)) ) || | 1364 | &config)) ) || |
1361 | (0 != STAT (config, &sbuf))) | 1365 | (0 != STAT (config, &sbuf))) |
1362 | { | 1366 | { |
@@ -1381,26 +1385,39 @@ setup_service (void *cls, const char *section) | |||
1381 | if (GNUNET_CONFIGURATION_have_value (cfg, section, "PIPECONTROL")) | 1385 | if (GNUNET_CONFIGURATION_have_value (cfg, section, "PIPECONTROL")) |
1382 | sl->pipe_control = GNUNET_CONFIGURATION_get_value_yesno (cfg, section, "PIPECONTROL"); | 1386 | sl->pipe_control = GNUNET_CONFIGURATION_get_value_yesno (cfg, section, "PIPECONTROL"); |
1383 | #endif | 1387 | #endif |
1384 | GNUNET_CONTAINER_DLL_insert (running_head, running_tail, sl); | 1388 | GNUNET_CONTAINER_DLL_insert (running_head, |
1385 | 1389 | running_tail, | |
1390 | sl); | ||
1386 | if (GNUNET_YES == | 1391 | if (GNUNET_YES == |
1387 | GNUNET_CONFIGURATION_get_value_yesno (cfg, section, "FORCESTART")) | 1392 | GNUNET_CONFIGURATION_get_value_yesno (cfg, |
1393 | section, | ||
1394 | "FORCESTART")) | ||
1388 | { | 1395 | { |
1389 | sl->force_start = GNUNET_YES; | 1396 | sl->force_start = GNUNET_YES; |
1397 | /* FIXME: we might like the pre-binding even for | ||
1398 | _certain_ services that have force_start set, | ||
1399 | otherwise interdependencies may again force | ||
1400 | client's to retry connections during startup. */ | ||
1390 | return; | 1401 | return; |
1391 | } | 1402 | } |
1392 | else | 1403 | else |
1393 | { | 1404 | { |
1394 | if (GNUNET_YES != | 1405 | if (GNUNET_YES != |
1395 | GNUNET_CONFIGURATION_get_value_yesno (cfg, section, "AUTOSTART")) | 1406 | GNUNET_CONFIGURATION_get_value_yesno (cfg, |
1407 | section, | ||
1408 | "AUTOSTART")) | ||
1396 | return; | 1409 | return; |
1397 | } | 1410 | } |
1398 | if (0 >= (ret = GNUNET_SERVICE_get_server_addresses (section, cfg, | 1411 | if (0 >= (ret = GNUNET_SERVICE_get_server_addresses (section, |
1399 | &addrs, &addr_lens))) | 1412 | cfg, |
1413 | &addrs, | ||
1414 | &addr_lens))) | ||
1400 | return; | 1415 | return; |
1401 | /* this will free (or capture) addrs[i] */ | 1416 | /* this will free (or capture) addrs[i] */ |
1402 | for (i = 0; i < ret; i++) | 1417 | for (i = 0; i < ret; i++) |
1403 | create_listen_socket (addrs[i], addr_lens[i], sl); | 1418 | create_listen_socket (addrs[i], |
1419 | addr_lens[i], | ||
1420 | sl); | ||
1404 | GNUNET_free (addrs); | 1421 | GNUNET_free (addrs); |
1405 | GNUNET_free (addr_lens); | 1422 | GNUNET_free (addr_lens); |
1406 | } | 1423 | } |