aboutsummaryrefslogtreecommitdiff
path: root/src/testing/test_testing_portreservation.c
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-08-15 16:27:27 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-08-15 16:27:27 +0000
commit356d73f3e59d50ab3aeee64d6e5384089428747b (patch)
treeb683d79727fa4074b2877d1efd50b53fd454253b /src/testing/test_testing_portreservation.c
parent2f540d8a505ee8842ea322513b381d7f3b48362d (diff)
downloadgnunet-356d73f3e59d50ab3aeee64d6e5384089428747b.tar.gz
gnunet-356d73f3e59d50ab3aeee64d6e5384089428747b.zip
- make no distinction between TCP and UDP port while reserving them
Diffstat (limited to 'src/testing/test_testing_portreservation.c')
-rw-r--r--src/testing/test_testing_portreservation.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/testing/test_testing_portreservation.c b/src/testing/test_testing_portreservation.c
index 81ba67e96..50d44a91c 100644
--- a/src/testing/test_testing_portreservation.c
+++ b/src/testing/test_testing_portreservation.c
@@ -52,27 +52,27 @@ run (void *cls, char *const *args, const char *cfgfile,
52 system = GNUNET_TESTING_system_create ("/tmp/gnunet-testing-new", 52 system = GNUNET_TESTING_system_create ("/tmp/gnunet-testing-new",
53 "localhost", NULL, NULL); 53 "localhost", NULL, NULL);
54 GNUNET_assert (NULL != system); 54 GNUNET_assert (NULL != system);
55 new_port1 = GNUNET_TESTING_reserve_port (system, GNUNET_YES); 55 new_port1 = GNUNET_TESTING_reserve_port (system);
56 LOG (GNUNET_ERROR_TYPE_DEBUG, 56 LOG (GNUNET_ERROR_TYPE_DEBUG,
57 "Reserved TCP port %u\n", new_port1); 57 "Reserved TCP port %u\n", new_port1);
58 if (0 == new_port1) 58 if (0 == new_port1)
59 goto end; 59 goto end;
60 new_port2 = GNUNET_TESTING_reserve_port (system, GNUNET_YES); 60 new_port2 = GNUNET_TESTING_reserve_port (system);
61 LOG (GNUNET_ERROR_TYPE_DEBUG, 61 LOG (GNUNET_ERROR_TYPE_DEBUG,
62 "Reserved TCP port %u\n", new_port2); 62 "Reserved TCP port %u\n", new_port2);
63 if (0 == new_port2) 63 if (0 == new_port2)
64 goto end; 64 goto end;
65 GNUNET_assert (new_port1 != new_port2); 65 GNUNET_assert (new_port1 != new_port2);
66 GNUNET_TESTING_release_port (system, GNUNET_YES, new_port1); 66 GNUNET_TESTING_release_port (system, new_port1);
67 old_port1 = new_port1; 67 old_port1 = new_port1;
68 new_port1 = 0; 68 new_port1 = 0;
69 new_port1 = GNUNET_TESTING_reserve_port (system, GNUNET_YES); 69 new_port1 = GNUNET_TESTING_reserve_port (system);
70 LOG (GNUNET_ERROR_TYPE_DEBUG, 70 LOG (GNUNET_ERROR_TYPE_DEBUG,
71 "Reserved TCP port %u\n", new_port1); 71 "Reserved TCP port %u\n", new_port1);
72 GNUNET_assert (0 != new_port1); 72 GNUNET_assert (0 != new_port1);
73 GNUNET_assert (old_port1 == new_port1); 73 GNUNET_assert (old_port1 == new_port1);
74 GNUNET_TESTING_release_port (system, GNUNET_YES, new_port1); 74 GNUNET_TESTING_release_port (system, new_port1);
75 GNUNET_TESTING_release_port (system, GNUNET_YES, new_port2); 75 GNUNET_TESTING_release_port (system, new_port2);
76 status = GNUNET_OK; 76 status = GNUNET_OK;
77 77
78 end: 78 end: