diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-09-07 16:07:48 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-09-07 16:07:48 +0000 |
commit | 230c72bb1a9aae87bbbd0f1da505f33fc42b1b99 (patch) | |
tree | e80c4b8028828fc9f6d4bf89ff1efda86fb07994 /src/transport/gnunet-transport-list-connections.c | |
parent | 381046a7d5c92f5ec1b9bf4566eecacfde269099 (diff) | |
download | gnunet-230c72bb1a9aae87bbbd0f1da505f33fc42b1b99.tar.gz gnunet-230c72bb1a9aae87bbbd0f1da505f33fc42b1b99.zip |
porting gnunet-transport-list-connections to binary address
Diffstat (limited to 'src/transport/gnunet-transport-list-connections.c')
-rw-r--r-- | src/transport/gnunet-transport-list-connections.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/transport/gnunet-transport-list-connections.c b/src/transport/gnunet-transport-list-connections.c index 0542a5cd9..64b67dcd4 100644 --- a/src/transport/gnunet-transport-list-connections.c +++ b/src/transport/gnunet-transport-list-connections.c | |||
@@ -53,13 +53,22 @@ static const struct GNUNET_CONFIGURATION_Handle *cfg; | |||
53 | * @param address NULL on error, otherwise 0-terminated printable UTF-8 string | 53 | * @param address NULL on error, otherwise 0-terminated printable UTF-8 string |
54 | */ | 54 | */ |
55 | static void | 55 | static void |
56 | process_address (void *cls, const char *address) | 56 | process_address (void *cls, const struct GNUNET_PeerIdentity *peer, |
57 | const char *transport, const void *addr, size_t addrlen) | ||
57 | { | 58 | { |
58 | #if VERBOSE | 59 | #if VERBOSE |
59 | connection_count++; | 60 | connection_count++; |
60 | #endif | 61 | #endif |
61 | if (address != NULL) | 62 | if ((peer != NULL) || (transport != NULL) || |
62 | fprintf (stdout, "%s\n", address); | 63 | ((addr != NULL) && (addrlen > 0))) |
64 | fprintf (stdout, "Peer `%s' plugin: `%s' address `%s'\n", | ||
65 | (peer != NULL) ? GNUNET_i2s (peer) : "<unknown>", | ||
66 | (transport != NULL) ? transport : "<unknown>", ((addr != NULL) && | ||
67 | (addrlen > 0) && | ||
68 | (transport != | ||
69 | NULL)) ? | ||
70 | "how do i resolve the name without transport service?" : | ||
71 | "<unknown>"); | ||
63 | } | 72 | } |
64 | 73 | ||
65 | 74 | ||