-dead code elimination
[oweals/gnunet.git] / src / core / test_core_api.c
index ab96fb47e926ca9ec22908157db1379ddfa41dca..184a640925649c450d4d5bae205b04173e8ffbc6 100644 (file)
@@ -153,9 +153,7 @@ transmit_ready (void *cls, size_t size, void *buf)
 
 
 static void
-connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
-                const struct GNUNET_ATS_Information *atsi,
-                unsigned int atsi_count)
+connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
 {
   struct PeerContext *pc = cls;
 
@@ -207,9 +205,7 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer)
 
 static int
 inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
-                const struct GNUNET_MessageHeader *message,
-                const struct GNUNET_ATS_Information *atsi,
-                unsigned int atsi_count)
+                const struct GNUNET_MessageHeader *message)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Core provides inbound data from `%4s'.\n", GNUNET_i2s (other));
@@ -219,9 +215,7 @@ inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
 
 static int
 outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
-                 const struct GNUNET_MessageHeader *message,
-                 const struct GNUNET_ATS_Information *atsi,
-                 unsigned int atsi_count)
+                 const struct GNUNET_MessageHeader *message)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Core notifies about outbound data for `%4s'.\n",
@@ -233,9 +227,7 @@ outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
 
 static int
 process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
-               const struct GNUNET_MessageHeader *message,
-               const struct GNUNET_ATS_Information *atsi,
-               unsigned int atsi_count)
+               const struct GNUNET_MessageHeader *message)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving message from `%4s'.\n",
               GNUNET_i2s (peer));
@@ -357,8 +349,8 @@ stop_arm (struct PeerContext *p)
 }
 
 
-static int
-check ()
+int
+main (int argc, char *argv1[])
 {
   char *const argv[] = { "test-core-api",
     "-c",
@@ -369,26 +361,17 @@ check ()
     GNUNET_GETOPT_OPTION_END
   };
   ok = 1;
+  GNUNET_log_setup ("test-core-api",
+                    "WARNING",
+                    NULL);
   GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv,
                       "test-core-api", "nohelp", options, &run, &ok);
   stop_arm (&p1);
   stop_arm (&p2);
-  return ok;
-}
-
-int
-main (int argc, char *argv[])
-{
-  int ret;
-
-  GNUNET_log_setup ("test-core-api",
-                    "WARNING",
-                    NULL);
-  ret = check ();
   GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1");
   GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-2");
 
-  return ret;
+  return ok;
 }
 
 /* end of test_core_api.c */