aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo-tool/gnunet-peerinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/peerinfo-tool/gnunet-peerinfo.c')
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c
index 28f2284ce..1963d6a98 100644
--- a/src/peerinfo-tool/gnunet-peerinfo.c
+++ b/src/peerinfo-tool/gnunet-peerinfo.c
@@ -37,8 +37,6 @@ static int be_quiet;
37 37
38static int get_self; 38static int get_self;
39 39
40static struct GNUNET_SCHEDULER_Handle *sched;
41
42static struct GNUNET_PEERINFO_Handle *peerinfo; 40static struct GNUNET_PEERINFO_Handle *peerinfo;
43 41
44static const struct GNUNET_CONFIGURATION_Handle *cfg; 42static const struct GNUNET_CONFIGURATION_Handle *cfg;
@@ -139,8 +137,7 @@ print_address (void *cls,
139 const void *addr, uint16_t addrlen) 137 const void *addr, uint16_t addrlen)
140{ 138{
141 struct PrintContext *pc = cls; 139 struct PrintContext *pc = cls;
142 GNUNET_TRANSPORT_address_lookup (sched, 140 GNUNET_TRANSPORT_address_lookup (cfg,
143 cfg,
144 addr, 141 addr,
145 addrlen, 142 addrlen,
146 no_resolve, 143 no_resolve,
@@ -194,14 +191,12 @@ print_peer_info (void *cls,
194 * Main function that will be run by the scheduler. 191 * Main function that will be run by the scheduler.
195 * 192 *
196 * @param cls closure 193 * @param cls closure
197 * @param s the scheduler to use
198 * @param args remaining command-line arguments 194 * @param args remaining command-line arguments
199 * @param cfgfile name of the configuration file used (for saving, can be NULL!) 195 * @param cfgfile name of the configuration file used (for saving, can be NULL!)
200 * @param c configuration 196 * @param c configuration
201 */ 197 */
202static void 198static void
203run (void *cls, 199run (void *cls,
204 struct GNUNET_SCHEDULER_Handle *s,
205 char *const *args, 200 char *const *args,
206 const char *cfgfile, 201 const char *cfgfile,
207 const struct GNUNET_CONFIGURATION_Handle *c) 202 const struct GNUNET_CONFIGURATION_Handle *c)
@@ -212,7 +207,6 @@ run (void *cls,
212 struct GNUNET_CRYPTO_HashAsciiEncoded enc; 207 struct GNUNET_CRYPTO_HashAsciiEncoded enc;
213 char *fn; 208 char *fn;
214 209
215 sched = s;
216 cfg = c; 210 cfg = c;
217 if (args[0] != NULL) 211 if (args[0] != NULL)
218 { 212 {
@@ -223,7 +217,7 @@ run (void *cls,
223 } 217 }
224 if (get_self != GNUNET_YES) 218 if (get_self != GNUNET_YES)
225 { 219 {
226 peerinfo = GNUNET_PEERINFO_connect (sched, cfg); 220 peerinfo = GNUNET_PEERINFO_connect (cfg);
227 if (peerinfo == NULL) 221 if (peerinfo == NULL)
228 { 222 {
229 fprintf (stderr, 223 fprintf (stderr,