aboutsummaryrefslogtreecommitdiff
path: root/src/nat
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-05-13 19:16:15 +0000
committerChristian Grothoff <christian@grothoff.org>2012-05-13 19:16:15 +0000
commitdf9e14ae741dfc3903e6089aea71124bd52f4e9a (patch)
tree710a76bbeeb5e991401e2a2b3dd33f72c12dc47b /src/nat
parent8f82d7a873a738b9345cd79d03a8b47350fdbcc1 (diff)
downloadgnunet-df9e14ae741dfc3903e6089aea71124bd52f4e9a.tar.gz
gnunet-df9e14ae741dfc3903e6089aea71124bd52f4e9a.zip
-fix segv
Diffstat (limited to 'src/nat')
-rw-r--r--src/nat/test_nat_test.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/nat/test_nat_test.c b/src/nat/test_nat_test.c
index 846d9b08e..8f1e03444 100644
--- a/src/nat/test_nat_test.c
+++ b/src/nat/test_nat_test.c
@@ -30,10 +30,6 @@
30#include "gnunet_util_lib.h" 30#include "gnunet_util_lib.h"
31#include "gnunet_nat_lib.h" 31#include "gnunet_nat_lib.h"
32 32
33
34#define VERBOSE GNUNET_NO
35
36
37/** 33/**
38 * Time to wait before stopping NAT test, in seconds 34 * Time to wait before stopping NAT test, in seconds
39 */ 35 */
@@ -84,28 +80,16 @@ main (int argc, char *const argv[])
84 GNUNET_GETOPT_OPTION_END 80 GNUNET_GETOPT_OPTION_END
85 }; 81 };
86 struct GNUNET_OS_Process *gns; 82 struct GNUNET_OS_Process *gns;
87
88 int nat_res; 83 int nat_res;
89
90 char *const argv_prog[] = { 84 char *const argv_prog[] = {
91 "test-nat-test", 85 "test-nat-test",
92 "-c", 86 "-c",
93 "test_nat_test_data.conf", 87 "test_nat_test_data.conf",
94 "-L",
95#if VERBOSE
96 "DEBUG",
97#else
98 "WARNING",
99#endif
100 NULL 88 NULL
101 }; 89 };
102 90
103 GNUNET_log_setup ("test-nat-test", 91 GNUNET_log_setup ("test-nat-test",
104#if VERBOSE
105 "DEBUG",
106#else
107 "WARNING", 92 "WARNING",
108#endif
109 NULL); 93 NULL);
110 94
111 nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server"); 95 nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server");
@@ -120,12 +104,9 @@ main (int argc, char *const argv[])
120 gns = 104 gns =
121 GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-nat-server", 105 GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-nat-server",
122 "gnunet-nat-server", 106 "gnunet-nat-server",
123#if VERBOSE
124 "-L", "DEBUG",
125#endif
126 "-c", "test_nat_test_data.conf", "12345", NULL); 107 "-c", "test_nat_test_data.conf", "12345", NULL);
127 GNUNET_assert (NULL != gns); 108 GNUNET_assert (NULL != gns);
128 GNUNET_PROGRAM_run (5, argv_prog, "test-nat-test", "nohelp", options, &run, 109 GNUNET_PROGRAM_run (3, argv_prog, "test-nat-test", "nohelp", options, &run,
129 NULL); 110 NULL);
130 GNUNET_break (0 == GNUNET_OS_process_kill (gns, SIGTERM)); 111 GNUNET_break (0 == GNUNET_OS_process_kill (gns, SIGTERM));
131 GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (gns)); 112 GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (gns));