-keep track of messages passed to mq
[oweals/gnunet.git] / src / sensor / test_sensor_api.c
index 319360bfcecdbd60c627aa5be71d7bd95909a409..8f7dbd5983ebed93dfd0c59e2e516c4ae867b79b 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C)
+     Copyright (C)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -14,8 +14,8 @@
 
      You should have received a copy of the GNU General Public License
      along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
 /**
  * @file sensor/test_sensor_api.c
@@ -30,9 +30,7 @@ static int ok = 1;
 
 
 static void
-run (void *cls,
-     char *const *args,
-     const char *cfgfile,
+run (void *cls, char *const *args, const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
   ok = 0;
@@ -47,25 +45,27 @@ check ()
     GNUNET_GETOPT_OPTION_END
   };
   struct GNUNET_OS_Process *proc;
-  char *path = GNUNET_OS_get_libexec_binary_path ( "gnunet-service-sensor");
+  char *path = GNUNET_OS_get_libexec_binary_path ("gnunet-service-sensor");
+
   if (NULL == path)
   {
-               fprintf (stderr, "Service executable not found `%s'\n", "gnunet-service-sensor");
-               return -1;
+    fprintf (stderr, "Service executable not found `%s'\n",
+             "gnunet-service-sensor");
+    return -1;
   }
 
-  proc = GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_ALL, NULL,
-      NULL, NULL, path, "gnunet-service-sensor", NULL);
+  proc =
+      GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_ALL, NULL, NULL,
+                               NULL, path, "gnunet-service-sensor", NULL);
 
   GNUNET_free (path);
   GNUNET_assert (NULL != proc);
-  GNUNET_PROGRAM_run (1, argv, "test-sensor-api", "nohelp",
-                      options, &run, &ok);
+  GNUNET_PROGRAM_run (1, argv, "test-sensor-api", "nohelp", options, &run, &ok);
   if (0 != GNUNET_OS_process_kill (proc, SIGTERM))
-    {
-      GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
-      ok = 1;
-    }
+  {
+    GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill");
+    ok = 1;
+  }
   GNUNET_OS_process_wait (proc);
   GNUNET_OS_process_destroy (proc);
   return ok;
@@ -75,9 +75,7 @@ check ()
 int
 main (int argc, char *argv[])
 {
-  GNUNET_log_setup ("test_statistics_api", 
-                   "WARNING",
-                   NULL);
+  GNUNET_log_setup ("test_statistics_api", "WARNING", NULL);
   return check ();
 }