aboutsummaryrefslogtreecommitdiff
path: root/src/vpn
diff options
context:
space:
mode:
authorPhilipp Tölke <toelke@in.tum.de>2011-03-14 15:16:28 +0000
committerPhilipp Tölke <toelke@in.tum.de>2011-03-14 15:16:28 +0000
commit236b945be1ccdbaa06792e87e622ead0b2770920 (patch)
tree4f0106a53a7abbde7dc354926fa5d982af9143ed /src/vpn
parent52ad30216d8f8ae72b32d8098f2d3807b677ae19 (diff)
downloadgnunet-236b945be1ccdbaa06792e87e622ead0b2770920.tar.gz
gnunet-236b945be1ccdbaa06792e87e622ead0b2770920.zip
fixed FIXMEs
Diffstat (limited to 'src/vpn')
-rw-r--r--src/vpn/gnunet-daemon-exit.c10
-rw-r--r--src/vpn/gnunet-service-dns.c10
2 files changed, 12 insertions, 8 deletions
diff --git a/src/vpn/gnunet-daemon-exit.c b/src/vpn/gnunet-daemon-exit.c
index 03e9831c8..1c53a83d1 100644
--- a/src/vpn/gnunet-daemon-exit.c
+++ b/src/vpn/gnunet-daemon-exit.c
@@ -292,21 +292,23 @@ read_service_conf (void *cls, const char *section, const char *option,
292 { 292 {
293 if (NULL == (hostname = strstr (redirect, ":"))) 293 if (NULL == (hostname = strstr (redirect, ":")))
294 { 294 {
295 // FIXME: bitch 295 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Warning: option %s is not formatted correctly!\n", redirect);
296 continue; 296 continue;
297 } 297 }
298 hostname[0] = '\0'; 298 hostname[0] = '\0';
299 hostname++; 299 hostname++;
300 if (NULL == (hostport = strstr (hostname, ":"))) 300 if (NULL == (hostport = strstr (hostname, ":")))
301 { 301 {
302 // FIXME: bitch 302 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Warning: option %s is not formatted correctly!\n", redirect);
303 continue; 303 continue;
304 } 304 }
305 hostport[0] = '\0'; 305 hostport[0] = '\0';
306 hostport++; 306 hostport++;
307 307
308 int local_port = atoi (redirect); 308 int local_port = atoi (redirect);
309 GNUNET_assert ((local_port > 0) && (local_port < 65536)); // FIXME: don't crash!!! 309 if (!((local_port > 0) && (local_port < 65536)))
310 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Warning: %s is not a correct port.", redirect);
311
310 *desc = local_port; 312 *desc = local_port;
311 313
312 GNUNET_CRYPTO_hash (desc, sizeof (GNUNET_HashCode) + 2, &hash); 314 GNUNET_CRYPTO_hash (desc, sizeof (GNUNET_HashCode) + 2, &hash);
@@ -642,7 +644,7 @@ run (void *cls,
642 }; 644 };
643 mesh_handle = GNUNET_MESH_connect(cfg_, 645 mesh_handle = GNUNET_MESH_connect(cfg_,
644 NULL, 646 NULL,
645 NULL, /* FIXME */ 647 NULL,
646 handlers); 648 handlers);
647 649
648 cfg = cfg_; 650 cfg = cfg_;
diff --git a/src/vpn/gnunet-service-dns.c b/src/vpn/gnunet-service-dns.c
index 8286b7abd..40c3d8052 100644
--- a/src/vpn/gnunet-service-dns.c
+++ b/src/vpn/gnunet-service-dns.c
@@ -595,12 +595,13 @@ get_port_from_redirects (const char *udp_redirects, const char *tcp_redirects)
595 { 595 {
596 if (NULL == (hostname = strstr (redirect, ":"))) 596 if (NULL == (hostname = strstr (redirect, ":")))
597 { 597 {
598 // FIXME: bitch 598 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Warning: option %s is not formatted correctly!\n", redirect);
599 continue; 599 continue;
600 } 600 }
601 hostname[0] = '\0'; 601 hostname[0] = '\0';
602 local_port = atoi (redirect); 602 local_port = atoi (redirect);
603 GNUNET_assert ((local_port > 0) && (local_port < 65536)); // FIXME: don't crash!!! 603 if (!((local_port > 0) && (local_port < 65536)))
604 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Warning: %s is not a correct port.", redirect);
604 605
605 ret |= (0xFFFF & htons(local_port)); 606 ret |= (0xFFFF & htons(local_port));
606 ret <<= 16; 607 ret <<= 16;
@@ -623,12 +624,13 @@ get_port_from_redirects (const char *udp_redirects, const char *tcp_redirects)
623 { 624 {
624 if (NULL == (hostname = strstr (redirect, ":"))) 625 if (NULL == (hostname = strstr (redirect, ":")))
625 { 626 {
626 // FIXME: bitch 627 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Warning: option %s is not formatted correctly!\n", redirect);
627 continue; 628 continue;
628 } 629 }
629 hostname[0] = '\0'; 630 hostname[0] = '\0';
630 local_port = atoi (redirect); 631 local_port = atoi (redirect);
631 GNUNET_assert ((local_port > 0) && (local_port < 65536)); // FIXME: don't crash!!! 632 if (!((local_port > 0) && (local_port < 65536)))
633 GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Warning: %s is not a correct port.", redirect);
632 634
633 ret |= (0xFFFF & htons(local_port)); 635 ret |= (0xFFFF & htons(local_port));
634 ret <<= 16; 636 ret <<= 16;