diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-04-10 08:56:10 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-04-10 08:56:10 +0000 |
commit | 16349a2370933c25901ecca6f19bea3ad1208783 (patch) | |
tree | e32d5c5383445ac3d1dfe28e498d1d79bdaa6738 /src/integration-tests | |
parent | 08e1b05fdeffaf4e355bc3001348630ac9909eee (diff) | |
download | gnunet-16349a2370933c25901ecca6f19bea3ad1208783.tar.gz gnunet-16349a2370933c25901ecca6f19bea3ad1208783.zip |
- mod
Diffstat (limited to 'src/integration-tests')
-rw-r--r-- | src/integration-tests/connection_watchdog.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/integration-tests/connection_watchdog.c b/src/integration-tests/connection_watchdog.c index 7cb8810c8..fb2d1067d 100644 --- a/src/integration-tests/connection_watchdog.c +++ b/src/integration-tests/connection_watchdog.c | |||
@@ -164,15 +164,6 @@ int stats_check_cb (void *cls, const char *subsystem, | |||
164 | transport_connections, statistics_transport_connections); | 164 | transport_connections, statistics_transport_connections); |
165 | fail = GNUNET_YES; | 165 | fail = GNUNET_YES; |
166 | } | 166 | } |
167 | |||
168 | if (transport_connections != statistics_transport_tcp_connections) | ||
169 | { | ||
170 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
171 | "Transport connections are inconsistent: %u transport notifications <-> %u in statistics (statistics_transport_tcp_connections)\n", | ||
172 | transport_connections, statistics_transport_tcp_connections); | ||
173 | fail = GNUNET_YES; | ||
174 | } | ||
175 | |||
176 | if (core_connections != statistics_core_entries_session_map) | 167 | if (core_connections != statistics_core_entries_session_map) |
177 | { | 168 | { |
178 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 169 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
@@ -193,6 +184,20 @@ int stats_check_cb (void *cls, const char *subsystem, | |||
193 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 184 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
194 | "Statistics consistency check successful : (%u transport / %u core) connections established\n", transport_connections, core_connections); | 185 | "Statistics consistency check successful : (%u transport / %u core) connections established\n", transport_connections, core_connections); |
195 | 186 | ||
187 | /* This is only an issue when transport_connections > statistics_transport_tcp_connections */ | ||
188 | if (transport_connections > statistics_transport_tcp_connections) | ||
189 | { | ||
190 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
191 | "Transport connections are inconsistent: %u transport notifications <-> %u in statistics (statistics_transport_tcp_connections)\n", | ||
192 | transport_connections, statistics_transport_tcp_connections); | ||
193 | fail = GNUNET_YES; | ||
194 | } | ||
195 | else | ||
196 | { | ||
197 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
198 | "Transport connections are inconsistent: %u transport notifications <-> %u in statistics (statistics_transport_tcp_connections)\n", | ||
199 | transport_connections, statistics_transport_tcp_connections); | ||
200 | } | ||
196 | 201 | ||
197 | if (GNUNET_SCHEDULER_NO_TASK == statistics_task) | 202 | if (GNUNET_SCHEDULER_NO_TASK == statistics_task) |
198 | statistics_task = GNUNET_SCHEDULER_add_delayed(REPEATED_STATS_DELAY, &stats_check, NULL); | 203 | statistics_task = GNUNET_SCHEDULER_add_delayed(REPEATED_STATS_DELAY, &stats_check, NULL); |
@@ -522,7 +527,7 @@ main (int argc, char *const *argv) | |||
522 | GNUNET_GETOPT_OPTION_END | 527 | GNUNET_GETOPT_OPTION_END |
523 | }; | 528 | }; |
524 | return (GNUNET_OK == | 529 | return (GNUNET_OK == |
525 | GNUNET_PROGRAM_run (argc, argv, "gnunet-template", | 530 | GNUNET_PROGRAM_run (argc, argv, "connection-watchdog", |
526 | gettext_noop ("help text"), options, &run, | 531 | gettext_noop ("help text"), options, &run, |
527 | NULL)) ? ret : 1; | 532 | NULL)) ? ret : 1; |
528 | } | 533 | } |