(no commit message)
[oweals/gnunet.git] / src / transport / test_plugin_transport.c
index ccaefd042b801489719ad3f6decac7a07af15ce3..ca69b760117205927ee7bc80958f6e8da730dcd2 100644 (file)
 #include "gnunet_protocols.h"
 #include "gnunet_program_lib.h"
 #include "gnunet_signatures.h"
-#include "plugin_transport.h"
+#include "gnunet_transport_plugin.h"
 #include "transport.h"
 
-#define VERBOSE GNUNET_YES
+#define VERBOSE GNUNET_NO
 
 /**
  * How long until we give up on transmitting the message?
@@ -59,11 +59,6 @@ static struct GNUNET_PeerIdentity my_identity;
  */
 static struct GNUNET_CRYPTO_RsaPrivateKey *my_private_key;
 
-/**
- * Our scheduler.
- */
-struct GNUNET_SCHEDULER_Handle *sched;
-
 /**
  * Our configuration.
  */
@@ -90,7 +85,6 @@ struct GNUNET_TRANSPORT_PluginFunctions *api;
 static int ok;
 
 /**
- * Initialize Environment for this plugin
  */
 static void
 receive (void *cls,
@@ -169,8 +163,7 @@ test_validation ()
                 api->check_address (api->cls,
                                     &soaddr, sizeof (soaddr)));
   ok = 0;
-  GNUNET_SCHEDULER_add_continuation (sched,
-                                     &unload_task,
+  GNUNET_SCHEDULER_add_continuation (&unload_task,
                                      (void *) cfg,
                                      GNUNET_SCHEDULER_REASON_PREREQ_DONE);
 }
@@ -180,7 +173,6 @@ static void
 setup_plugin_environment ()
 {
   env.cfg = cfg;
-  env.sched = sched;
   env.my_identity = &my_identity;
   env.cls = &env;
   env.receive = &receive;
@@ -193,12 +185,10 @@ setup_plugin_environment ()
  * Runs the test.
  *
  * @param cls closure
- * @param s scheduler to use
  * @param c configuration to use
  */
 static void
 run (void *cls,
-     struct GNUNET_SCHEDULER_Handle *s,
      char *const *args,
      const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *c)
 {
@@ -206,7 +196,6 @@ run (void *cls,
   char *keyfile;
   char *libname;
 
-  sched = s;
   cfg = c;
   /* parse configuration */
   if ((GNUNET_OK !=