*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_hello_lib.h"
-#include "gnunet_getopt_lib.h"
-#include "gnunet_os_lib.h"
-#include "gnunet_program_lib.h"
-#include "gnunet_scheduler_lib.h"
#include "gnunet_transport_service.h"
-#include "transport.h"
#include "transport-testing.h"
-#define VERBOSE GNUNET_NO
-
-#define VERBOSE_ARM GNUNET_NO
-
-#define START_ARM GNUNET_YES
-
/**
* How long until we give up on transmitting the message?
*/
static GNUNET_SCHEDULER_TaskIdentifier timer_task;
-struct GNUNET_TRANSPORT_TESTING_handle *tth;
+static struct GNUNET_TRANSPORT_TESTING_handle *tth;
-struct PeerContext *p1;
+static struct PeerContext *p1;
-struct PeerContext *p2;
+static struct PeerContext *p2;
static GNUNET_TRANSPORT_TESTING_ConnectRequest cc;
-struct GNUNET_TRANSPORT_TransmitHandle *th;
+static struct GNUNET_TRANSPORT_TransmitHandle *th;
-char *cfg_file_p1;
+static char *cfg_file_p1;
-char *cfg_file_p2;
+static char *cfg_file_p2;
static struct GNUNET_TIME_Relative time_running;
th = NULL;
}
+
static void
timer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
shutdown_flag = GNUNET_NO;
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Waiting for %llu seconds\n", (WAIT.rel_value) / 1000);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Waiting for %llu seconds\n", (WAIT.rel_value) / 1000);
if (die_task != GNUNET_SCHEDULER_NO_TASK)
GNUNET_SCHEDULER_cancel (die_task);
timer_task = GNUNET_SCHEDULER_add_now (&timer, NULL);
}
-void
+
+static void
start_cb (struct PeerContext *p, void *cls)
{
static int started;
static char *const argv[] = { "test-transport-api-timeout",
"-c",
"test_transport_api_data.conf",
-#if VERBOSE
- "-L", "DEBUG",
-#endif
NULL
};
static struct GNUNET_GETOPT_CommandLineOption options[] = {
GNUNET_GETOPT_OPTION_END
};
-#if WRITECONFIG
- setTransportOptions ("test_transport_api_data.conf");
-#endif
timer_task = GNUNET_SCHEDULER_NO_TASK;
ok = 1;
GNUNET_TRANSPORT_TESTING_get_test_name (argv[0], &test_name);
GNUNET_log_setup (test_name,
-#if VERBOSE
- "DEBUG",
-#else
"WARNING",
-#endif
NULL);
GNUNET_TRANSPORT_TESTING_get_test_source_name (__FILE__, &test_source);