aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/test_transport_api.c')
-rw-r--r--src/transport/test_transport_api.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c
index cd09511ac..52b9282de 100644
--- a/src/transport/test_transport_api.c
+++ b/src/transport/test_transport_api.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 (C) 2009 Christian Grothoff (and other contributing authors) 3 (C) 2009, 2010 Christian Grothoff (and other contributing authors)
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
@@ -269,6 +269,7 @@ exchange_hello (void *cls,
269 GNUNET_TRANSPORT_get_hello (p2.th, &exchange_hello_last, &p2); 269 GNUNET_TRANSPORT_get_hello (p2.th, &exchange_hello_last, &p2);
270} 270}
271 271
272
272static void 273static void
273run (void *cls, 274run (void *cls,
274 struct GNUNET_SCHEDULER_Handle *s, 275 struct GNUNET_SCHEDULER_Handle *s,
@@ -278,7 +279,6 @@ run (void *cls,
278 GNUNET_assert (ok == 1); 279 GNUNET_assert (ok == 1);
279 OKPP; 280 OKPP;
280 sched = s; 281 sched = s;
281
282 die_task = GNUNET_SCHEDULER_add_delayed (sched, 282 die_task = GNUNET_SCHEDULER_add_delayed (sched,
283 TIMEOUT, 283 TIMEOUT,
284 &end_badly, NULL); 284 &end_badly, NULL);
@@ -318,8 +318,7 @@ run (void *cls,
318static int 318static int
319check () 319check ()
320{ 320{
321 321 static char *const argv[] = { "test-transport-api",
322 char *const argv[] = { "test-transport-api",
323 "-c", 322 "-c",
324 "test_transport_api_data.conf", 323 "test_transport_api_data.conf",
325#if VERBOSE 324#if VERBOSE
@@ -327,15 +326,13 @@ check ()
327#endif 326#endif
328 NULL 327 NULL
329 }; 328 };
329 static struct GNUNET_GETOPT_CommandLineOption options[] = {
330 GNUNET_GETOPT_OPTION_END
331 };
330 332
331#if WRITECONFIG 333#if WRITECONFIG
332 setTransportOptions("test_transport_api_data.conf"); 334 setTransportOptions("test_transport_api_data.conf");
333#endif 335#endif
334
335 struct GNUNET_GETOPT_CommandLineOption options[] = {
336 GNUNET_GETOPT_OPTION_END
337 };
338
339 ok = 1; 336 ok = 1;
340 GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, 337 GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1,
341 argv, "test-transport-api", "nohelp", 338 argv, "test-transport-api", "nohelp",
@@ -374,13 +371,10 @@ get_path_from_PATH ()
374 pos = end + 1; 371 pos = end + 1;
375 } 372 }
376 sprintf (buf, "%s/%s", pos, "gnunet-nat-server"); 373 sprintf (buf, "%s/%s", pos, "gnunet-nat-server");
374 GNUNET_free (path);
377 if (GNUNET_DISK_file_test (buf) == GNUNET_YES) 375 if (GNUNET_DISK_file_test (buf) == GNUNET_YES)
378 { 376 return buf;
379 GNUNET_free (path);
380 return buf;
381 }
382 GNUNET_free (buf); 377 GNUNET_free (buf);
383 GNUNET_free (path);
384 return NULL; 378 return NULL;
385} 379}
386 380