diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-04-11 13:45:11 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-04-11 13:45:11 +0000 |
commit | f705b40724e7747480f08caadc1c85a759e2d4de (patch) | |
tree | d076c79e1a3385a1650ed86ec78a882e31012459 /src/integration-tests | |
parent | c570ddd55c8822fba50a460d398c2296f80d74df (diff) | |
download | gnunet-f705b40724e7747480f08caadc1c85a759e2d4de.tar.gz gnunet-f705b40724e7747480f08caadc1c85a759e2d4de.zip |
- switch to netstat for compatiblity
Diffstat (limited to 'src/integration-tests')
-rw-r--r-- | src/integration-tests/connection_watchdog.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/integration-tests/connection_watchdog.c b/src/integration-tests/connection_watchdog.c index c3c19ce5e..fc0d27f3e 100644 --- a/src/integration-tests/connection_watchdog.c +++ b/src/integration-tests/connection_watchdog.c | |||
@@ -203,10 +203,10 @@ check_lowlevel_connections (int port, int protocol) | |||
203 | } | 203 | } |
204 | 204 | ||
205 | 205 | ||
206 | GNUNET_asprintf(&cmdline, "ss %s \\( sport = :%u or dport = :%u \\)", proto, port, port); | 206 | GNUNET_asprintf(&cmdline, "netstat -n %s | grep %u", proto, port); |
207 | 207 | ||
208 | if (system ("ss > /dev/null 2> /dev/null")) | 208 | if (system ("netstat -n > /dev/null 2> /dev/null")) |
209 | if (system ("ss > /dev/null 2> /dev/null") == 0) | 209 | if (system ("netstat -n > /dev/null 2> /dev/null") == 0) |
210 | f = popen (cmdline, "r"); | 210 | f = popen (cmdline, "r"); |
211 | else | 211 | else |
212 | f = NULL; | 212 | f = NULL; |
@@ -219,10 +219,10 @@ check_lowlevel_connections (int port, int protocol) | |||
219 | return -1; | 219 | return -1; |
220 | } | 220 | } |
221 | 221 | ||
222 | count = 0; | ||
222 | while (NULL != fgets (line, sizeof (line), f)) | 223 | while (NULL != fgets (line, sizeof (line), f)) |
223 | { | 224 | { |
224 | /* read */ | 225 | /* read */ |
225 | |||
226 | //printf ("%s", line); | 226 | //printf ("%s", line); |
227 | count ++; | 227 | count ++; |
228 | } | 228 | } |
@@ -310,7 +310,7 @@ int stats_check_cb (void *cls, const char *subsystem, | |||
310 | if (GNUNET_YES == have_tcp) | 310 | if (GNUNET_YES == have_tcp) |
311 | { | 311 | { |
312 | struct TransportPlugin * p = find_plugin ("tcp"); | 312 | struct TransportPlugin * p = find_plugin ("tcp"); |
313 | int low_level_connections_tcp = check_lowlevel_connections (p->port, tcp); | 313 | int low_level_connections_tcp = check_lowlevel_connections (p->port, p->protocol); |
314 | 314 | ||
315 | if (low_level_connections_tcp != -1) | 315 | if (low_level_connections_tcp != -1) |
316 | { | 316 | { |