aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-03-28 08:41:34 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-03-28 08:41:34 +0000
commitf21600b4f3adcf4ef00fe4713fd81a8215972121 (patch)
treed09f24938199cc5059dd617bf6c1f9a215d4d419
parent90d3fb4c376cfa3dbdc3194412673affb35729b4 (diff)
downloadgnunet-f21600b4f3adcf4ef00fe4713fd81a8215972121.tar.gz
gnunet-f21600b4f3adcf4ef00fe4713fd81a8215972121.zip
improved printing
-rw-r--r--src/transport/gnunet-transport.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c
index 119584810..40d28576f 100644
--- a/src/transport/gnunet-transport.c
+++ b/src/transport/gnunet-transport.c
@@ -950,7 +950,9 @@ print_info (const struct GNUNET_PeerIdentity *id, const char *transport,
950 const char *addr, enum GNUNET_TRANSPORT_PeerState state, 950 const char *addr, enum GNUNET_TRANSPORT_PeerState state,
951 struct GNUNET_TIME_Absolute state_timeout) 951 struct GNUNET_TIME_Absolute state_timeout)
952{ 952{
953 if ((GNUNET_YES == iterate_all) || (GNUNET_YES == monitor_connections) ) 953
954 if ( ((GNUNET_YES == iterate_connections) && (GNUNET_YES == iterate_all)) ||
955 (GNUNET_YES == monitor_connections) )
954 { 956 {
955 FPRINTF (stdout, _("Peer `%s': %s %s in state `%s' until %s\n"), 957 FPRINTF (stdout, _("Peer `%s': %s %s in state `%s' until %s\n"),
956 GNUNET_i2s (id), 958 GNUNET_i2s (id),
@@ -959,12 +961,12 @@ print_info (const struct GNUNET_PeerIdentity *id, const char *transport,
959 GNUNET_TRANSPORT_ps2s (state), 961 GNUNET_TRANSPORT_ps2s (state),
960 GNUNET_STRINGS_absolute_time_to_string (state_timeout)); 962 GNUNET_STRINGS_absolute_time_to_string (state_timeout));
961 } 963 }
962 else 964 else if ( (GNUNET_YES == iterate_connections) &&
965 (GNUNET_TRANSPORT_is_connected(state)) )
963 { 966 {
964 /* Only connected peers, skip state */ 967 /* Only connected peers, skip state */
965 FPRINTF (stdout, _("Peer `%s': %s %s\n"), GNUNET_i2s (id), transport, addr); 968 FPRINTF (stdout, _("Peer `%s': %s %s\n"), GNUNET_i2s (id), transport, addr);
966 } 969 }
967
968} 970}
969 971
970static void 972static void