diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-09-14 11:59:46 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-09-14 11:59:46 +0000 |
commit | 1fe79fd553e21a20206301c18568d30158c9dd46 (patch) | |
tree | 3db4e42adb872d1e8aa792643c341a14b2959736 /src/vpn/gnunet-service-dns.c | |
parent | f709218364f7d40e5a13938886514e866602715d (diff) | |
download | gnunet-1fe79fd553e21a20206301c18568d30158c9dd46.tar.gz gnunet-1fe79fd553e21a20206301c18568d30158c9dd46.zip |
indentation
Diffstat (limited to 'src/vpn/gnunet-service-dns.c')
-rw-r--r-- | src/vpn/gnunet-service-dns.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/vpn/gnunet-service-dns.c b/src/vpn/gnunet-service-dns.c index bdbf7e001..271c8a772 100644 --- a/src/vpn/gnunet-service-dns.c +++ b/src/vpn/gnunet-service-dns.c | |||
@@ -1265,16 +1265,14 @@ publish_iterate (void *cls __attribute__ ((unused)), const char *section) | |||
1265 | if ((strlen (section) < 8) || | 1265 | if ((strlen (section) < 8) || |
1266 | (0 != strcmp (".gnunet.", section + (strlen (section) - 8)))) | 1266 | (0 != strcmp (".gnunet.", section + (strlen (section) - 8)))) |
1267 | return; | 1267 | return; |
1268 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1268 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Parsing dns-name %s\n", section); |
1269 | "Parsing dns-name %s\n", | ||
1270 | section); | ||
1271 | if (GNUNET_OK != | 1269 | if (GNUNET_OK != |
1272 | GNUNET_CONFIGURATION_get_value_string (cfg, section, "UDP_REDIRECTS", | 1270 | GNUNET_CONFIGURATION_get_value_string (cfg, section, "UDP_REDIRECTS", |
1273 | &udp_redirects)) | 1271 | &udp_redirects)) |
1274 | udp_redirects = NULL; | 1272 | udp_redirects = NULL; |
1275 | if (GNUNET_OK != | 1273 | if (GNUNET_OK != |
1276 | GNUNET_CONFIGURATION_get_value_string (cfg, section, "TCP_REDIRECTS", | 1274 | GNUNET_CONFIGURATION_get_value_string (cfg, section, "TCP_REDIRECTS", |
1277 | &tcp_redirects)) | 1275 | &tcp_redirects)) |
1278 | tcp_redirects = NULL; | 1276 | tcp_redirects = NULL; |
1279 | 1277 | ||
1280 | if (GNUNET_OK != | 1278 | if (GNUNET_OK != |
@@ -1307,21 +1305,21 @@ publish_iterate (void *cls __attribute__ ((unused)), const char *section) | |||
1307 | publish_name (section, ports, service_type, my_private_key); | 1305 | publish_name (section, ports, service_type, my_private_key); |
1308 | if (GNUNET_OK == | 1306 | if (GNUNET_OK == |
1309 | GNUNET_CONFIGURATION_get_value_string (cfg, section, "ALTERNATIVE_NAMES", | 1307 | GNUNET_CONFIGURATION_get_value_string (cfg, section, "ALTERNATIVE_NAMES", |
1310 | &alternative_names)) | 1308 | &alternative_names)) |
1309 | { | ||
1310 | for (alternative_name = strtok (alternative_names, " "); | ||
1311 | alternative_name != NULL; alternative_name = strtok (NULL, " ")) | ||
1311 | { | 1312 | { |
1312 | for (alternative_name = strtok (alternative_names, " "); | 1313 | char *altname = |
1313 | alternative_name != NULL; alternative_name = strtok (NULL, " ")) | 1314 | alloca (strlen (alternative_name) + strlen (section) + 1 + 1); |
1314 | { | 1315 | strcpy (altname, alternative_name); |
1315 | char *altname = | 1316 | strcpy (altname + strlen (alternative_name) + 1, section); |
1316 | alloca (strlen (alternative_name) + strlen (section) + 1 + 1); | 1317 | altname[strlen (alternative_name)] = '.'; |
1317 | strcpy (altname, alternative_name); | 1318 | |
1318 | strcpy (altname + strlen (alternative_name) + 1, section); | 1319 | publish_name (altname, ports, service_type, my_private_key); |
1319 | altname[strlen (alternative_name)] = '.'; | ||
1320 | |||
1321 | publish_name (altname, ports, service_type, my_private_key); | ||
1322 | } | ||
1323 | GNUNET_free (alternative_names); | ||
1324 | } | 1320 | } |
1321 | GNUNET_free (alternative_names); | ||
1322 | } | ||
1325 | GNUNET_CRYPTO_rsa_key_free (my_private_key); | 1323 | GNUNET_CRYPTO_rsa_key_free (my_private_key); |
1326 | GNUNET_free_non_null (udp_redirects); | 1324 | GNUNET_free_non_null (udp_redirects); |
1327 | GNUNET_free_non_null (tcp_redirects); | 1325 | GNUNET_free_non_null (tcp_redirects); |