aboutsummaryrefslogtreecommitdiff
path: root/src/integration-tests
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-04-11 12:04:16 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-04-11 12:04:16 +0000
commit6d01103efa1bcd9ef68a79261b34218599ed1eec (patch)
tree5fb95c54eeae978c464e328fa99136de26f38d04 /src/integration-tests
parentbf59837c28430a1ec09dcf2fbbebbcc2e8d7bc8b (diff)
downloadgnunet-6d01103efa1bcd9ef68a79261b34218599ed1eec.tar.gz
gnunet-6d01103efa1bcd9ef68a79261b34218599ed1eec.zip
- shorten log messages
Diffstat (limited to 'src/integration-tests')
-rw-r--r--src/integration-tests/connection_watchdog.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/integration-tests/connection_watchdog.c b/src/integration-tests/connection_watchdog.c
index 27d605aab..f70755076 100644
--- a/src/integration-tests/connection_watchdog.c
+++ b/src/integration-tests/connection_watchdog.c
@@ -226,7 +226,7 @@ int stats_check_cb (void *cls, const char *subsystem,
226 if (transport_connections != core_connections) 226 if (transport_connections != core_connections)
227 { 227 {
228 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 228 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
229 "Transport connections are inconsistent: %u transport notifications <-> %u core notifications\n", 229 "Transport connections are inconsistent:\n %u transport notifications <-> %u core notifications\n",
230 transport_connections, core_connections); 230 transport_connections, core_connections);
231 fail = GNUNET_YES; 231 fail = GNUNET_YES;
232 } 232 }
@@ -234,14 +234,14 @@ int stats_check_cb (void *cls, const char *subsystem,
234 if (transport_connections != statistics_transport_connections) 234 if (transport_connections != statistics_transport_connections)
235 { 235 {
236 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 236 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
237 "Transport connections are inconsistent: %u transport notifications <-> %u in statistics (peers connected)\n", 237 "Transport connections are inconsistent:\n %u transport notifications <-> %u in statistics (peers connected)\n",
238 transport_connections, statistics_transport_connections); 238 transport_connections, statistics_transport_connections);
239 fail = GNUNET_YES; 239 fail = GNUNET_YES;
240 } 240 }
241 if (core_connections != statistics_core_entries_session_map) 241 if (core_connections != statistics_core_entries_session_map)
242 { 242 {
243 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 243 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
244 "Transport connections are inconsistent: %u core notifications <-> %u in statistics (entries session map)\n", 244 "Transport connections are inconsistent:\n %u core notifications <-> %u in statistics (entries session map)\n",
245 core_connections, statistics_core_entries_session_map); 245 core_connections, statistics_core_entries_session_map);
246 fail = GNUNET_YES; 246 fail = GNUNET_YES;
247 } 247 }
@@ -249,7 +249,7 @@ int stats_check_cb (void *cls, const char *subsystem,
249 if (core_connections != statistics_core_neighbour_entries) 249 if (core_connections != statistics_core_neighbour_entries)
250 { 250 {
251 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 251 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
252 "Transport connections are inconsistent: %u core notifications <-> %u in statistics (neighbour entries allocated)\n", 252 "Transport connections are inconsistent:\n %u core notifications <-> %u in statistics (neighbour entries allocated)\n",
253 core_connections, statistics_core_neighbour_entries); 253 core_connections, statistics_core_neighbour_entries);
254 fail = GNUNET_YES; 254 fail = GNUNET_YES;
255 } 255 }
@@ -262,16 +262,21 @@ int stats_check_cb (void *cls, const char *subsystem,
262 if ((low_level_connections_tcp != -1) && (statistics_transport_tcp_connections > low_level_connections_tcp)) 262 if ((low_level_connections_tcp != -1) && (statistics_transport_tcp_connections > low_level_connections_tcp))
263 { 263 {
264 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 264 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
265 "Lowlevel connections are inconsistent: %u transport tcp sessions <-> %i established tcp connections\n", 265 "Lowlevel connections are inconsistent:\n %u transport tcp sessions <-> %i established tcp connections\n",
266 statistics_transport_tcp_connections, low_level_connections_tcp); 266 statistics_transport_tcp_connections, low_level_connections_tcp);
267 fail = GNUNET_YES; 267 fail = GNUNET_YES;
268 } 268 }
269 else 269 else if (low_level_connections_tcp != -1)
270 { 270 {
271 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 271 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
272 "%u TCP connections, %u UDP connections \n", 272 "%u TCP connections, %u UDP connections \n",
273 low_level_connections_tcp, low_level_connections_udp); 273 low_level_connections_tcp, low_level_connections_udp);
274 } 274 }
275 else
276 {
277 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
278 "Error obtaining TCP connections\n");
279 }
275 280
276 281
277 if (transport_connections > statistics_transport_tcp_connections) 282 if (transport_connections > statistics_transport_tcp_connections)
@@ -492,7 +497,7 @@ transport_notify_connect_cb (void *cls,
492 uint32_t ats_count) 497 uint32_t ats_count)
493{ 498{
494 transport_connections ++; 499 transport_connections ++;
495 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "TRANSPORT connect notification for peer `%s' (%u total)\n", 500 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "TRANSPORT connect for peer `%s' (%u total)\n",
496 GNUNET_i2s (peer), transport_connections); 501 GNUNET_i2s (peer), transport_connections);
497 map_connect (peer, th); 502 map_connect (peer, th);
498} 503}
@@ -510,7 +515,7 @@ transport_notify_disconnect_cb (void *cls,
510 GNUNET_PeerIdentity * peer) 515 GNUNET_PeerIdentity * peer)
511{ 516{
512 GNUNET_assert (transport_connections > 0); 517 GNUNET_assert (transport_connections > 0);
513 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "TRANSPORT disconnect notification for peer `%s' (%u total)\n", 518 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "TRANSPORT disconnect for peer `%s' (%u total)\n",
514 GNUNET_i2s (peer), transport_connections) ; 519 GNUNET_i2s (peer), transport_connections) ;
515 map_disconnect (peer, th); 520 map_disconnect (peer, th);
516 transport_connections --; 521 transport_connections --;
@@ -526,13 +531,13 @@ core_connect_cb (void *cls, const struct GNUNET_PeerIdentity *peer,
526 if (0 != memcmp (peer, &my_peer_id, sizeof (struct GNUNET_PeerIdentity))) 531 if (0 != memcmp (peer, &my_peer_id, sizeof (struct GNUNET_PeerIdentity)))
527 { 532 {
528 core_connections ++; 533 core_connections ++;
529 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "CORE connect notification for peer `%s' (%u total)\n", 534 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "CORE connect for peer `%s' (%u total)\n",
530 GNUNET_i2s (peer), core_connections); 535 GNUNET_i2s (peer), core_connections);
531 map_connect (peer, ch); 536 map_connect (peer, ch);
532 } 537 }
533 else 538 else
534 { 539 {
535 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "CORE connect notification for myself `%s' (%u total)\n", 540 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "CORE connect for myself `%s' (%u total)\n",
536 GNUNET_i2s (peer), core_connections); 541 GNUNET_i2s (peer), core_connections);
537 } 542 }
538} 543}
@@ -545,14 +550,14 @@ core_disconnect_cb (void *cls,
545 if (0 != memcmp (peer, &my_peer_id, sizeof (struct GNUNET_PeerIdentity))) 550 if (0 != memcmp (peer, &my_peer_id, sizeof (struct GNUNET_PeerIdentity)))
546 { 551 {
547 GNUNET_assert (core_connections >= 0); 552 GNUNET_assert (core_connections >= 0);
548 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "CORE disconnect notification for peer `%s' (%u total)\n", 553 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "CORE disconnect for peer `%s' (%u total)\n",
549 GNUNET_i2s (peer), core_connections); 554 GNUNET_i2s (peer), core_connections);
550 map_disconnect (peer, ch); 555 map_disconnect (peer, ch);
551 core_connections --; 556 core_connections --;
552 } 557 }
553 else 558 else
554 { 559 {
555 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "CORE disconnect notification for myself `%s' (%u total)\n", 560 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "CORE disconnect for myself `%s' (%u total)\n",
556 GNUNET_i2s (peer), core_connections); 561 GNUNET_i2s (peer), core_connections);
557 } 562 }
558 563
@@ -619,7 +624,7 @@ main (int argc, char *const *argv)
619 GNUNET_GETOPT_OPTION_END 624 GNUNET_GETOPT_OPTION_END
620 }; 625 };
621 return (GNUNET_OK == 626 return (GNUNET_OK ==
622 GNUNET_PROGRAM_run (argc, argv, "connection-watchdog", 627 GNUNET_PROGRAM_run (argc, argv, "cn",
623 gettext_noop ("help text"), options, &run, 628 gettext_noop ("help text"), options, &run,
624 NULL)) ? ret : 1; 629 NULL)) ? ret : 1;
625} 630}