diff options
Diffstat (limited to 'src/transport/gnunet-transport-list-connections.c')
-rw-r--r-- | src/transport/gnunet-transport-list-connections.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/transport/gnunet-transport-list-connections.c b/src/transport/gnunet-transport-list-connections.c index 39950467d..d68d2fedf 100644 --- a/src/transport/gnunet-transport-list-connections.c +++ b/src/transport/gnunet-transport-list-connections.c | |||
@@ -41,7 +41,7 @@ | |||
41 | static int no_resolve; | 41 | static int no_resolve; |
42 | 42 | ||
43 | #if VERBOSE | 43 | #if VERBOSE |
44 | static unsigned int connection_count; | 44 | static unsigned int connection_count; |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | static const struct GNUNET_CONFIGURATION_Handle *cfg; | 47 | static const struct GNUNET_CONFIGURATION_Handle *cfg; |
@@ -53,14 +53,13 @@ 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, | 56 | process_address (void *cls, const char *address) |
57 | const char *address) | ||
58 | { | 57 | { |
59 | #if VERBOSE | 58 | #if VERBOSE |
60 | connection_count++; | 59 | connection_count++; |
61 | #endif | 60 | #endif |
62 | if (address != NULL) | 61 | if (address != NULL) |
63 | fprintf(stdout, "%s\n", address); | 62 | fprintf (stdout, "%s\n", address); |
64 | } | 63 | } |
65 | 64 | ||
66 | 65 | ||
@@ -75,18 +74,15 @@ process_address (void *cls, | |||
75 | static void | 74 | static void |
76 | run (void *cls, | 75 | run (void *cls, |
77 | char *const *args, | 76 | char *const *args, |
78 | const char *cfgfile, | 77 | const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c) |
79 | const struct GNUNET_CONFIGURATION_Handle *c) | ||
80 | { | 78 | { |
81 | 79 | ||
82 | cfg = c; | 80 | cfg = c; |
83 | if (args[0] != NULL) | 81 | if (args[0] != NULL) |
84 | { | 82 | { |
85 | fprintf (stderr, | 83 | fprintf (stderr, _("Invalid command line argument `%s'\n"), args[0]); |
86 | _("Invalid command line argument `%s'\n"), | 84 | return; |
87 | args[0]); | 85 | } |
88 | return; | ||
89 | } | ||
90 | 86 | ||
91 | GNUNET_TRANSPORT_address_iterate (cfg, | 87 | GNUNET_TRANSPORT_address_iterate (cfg, |
92 | GNUNET_TIME_UNIT_MINUTES, | 88 | GNUNET_TIME_UNIT_MINUTES, |
@@ -114,7 +110,8 @@ main (int argc, char *const *argv) | |||
114 | GNUNET_PROGRAM_run (argc, | 110 | GNUNET_PROGRAM_run (argc, |
115 | argv, | 111 | argv, |
116 | "gnunet-list-connections", | 112 | "gnunet-list-connections", |
117 | gettext_noop ("Print information about connected peers."), | 113 | gettext_noop |
114 | ("Print information about connected peers."), | ||
118 | options, &run, NULL)) ? 0 : 1; | 115 | options, &run, NULL)) ? 0 : 1; |
119 | } | 116 | } |
120 | 117 | ||