diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-08-30 13:23:04 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-08-30 13:23:04 +0000 |
commit | c526fb6819ff203838e5fa2b5905b5d9f6309380 (patch) | |
tree | 8bbb8494e6934213c1be45f8c9bb2c7840e06bb3 /src | |
parent | b49e9a9daaf7d7b3ad02c7494fe7b570dea3bf92 (diff) | |
download | gnunet-c526fb6819ff203838e5fa2b5905b5d9f6309380.tar.gz gnunet-c526fb6819ff203838e5fa2b5905b5d9f6309380.zip |
check if gnunet-nat-server is correctly installed
Diffstat (limited to 'src')
-rw-r--r-- | src/nat/test_nat_test.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nat/test_nat_test.c b/src/nat/test_nat_test.c index b8db301aa..5a716bd8e 100644 --- a/src/nat/test_nat_test.c +++ b/src/nat/test_nat_test.c | |||
@@ -85,6 +85,8 @@ main (int argc, char *const argv[]) | |||
85 | }; | 85 | }; |
86 | struct GNUNET_OS_Process *gns; | 86 | struct GNUNET_OS_Process *gns; |
87 | 87 | ||
88 | int nat_res; | ||
89 | |||
88 | char *const argv_prog[] = { | 90 | char *const argv_prog[] = { |
89 | "test-nat-test", | 91 | "test-nat-test", |
90 | "-c", | 92 | "-c", |
@@ -105,6 +107,25 @@ main (int argc, char *const argv[]) | |||
105 | "WARNING", | 107 | "WARNING", |
106 | #endif | 108 | #endif |
107 | NULL); | 109 | NULL); |
110 | |||
111 | nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server"); | ||
112 | if (GNUNET_NO == nat_res) | ||
113 | { | ||
114 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
115 | "Cannot run NAT test: `%s' %s \n", | ||
116 | "gnunet-nat-server", | ||
117 | "SUID not set"); | ||
118 | return 0; | ||
119 | } | ||
120 | if (GNUNET_SYSERR == nat_res) | ||
121 | { | ||
122 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | ||
123 | "Cannot run NAT test: `%s' %s \n", | ||
124 | "gnunet-nat-server", | ||
125 | "file not found"); | ||
126 | return 0; | ||
127 | } | ||
128 | |||
108 | gns = | 129 | gns = |
109 | GNUNET_OS_start_process (NULL, NULL, "gnunet-nat-server", | 130 | GNUNET_OS_start_process (NULL, NULL, "gnunet-nat-server", |
110 | "gnunet-nat-server", | 131 | "gnunet-nat-server", |