fix compiler warning for format string
[oweals/gnunet.git] / src / gns / gnunet-bcd.c
index e7be8fd841b434fe55d37af77d52e0fe88f72526..21471350d195833afa578384e0a1e1f6de1e1122 100644 (file)
@@ -90,10 +90,14 @@ struct Entry
  * Main request handler.
  */
 static int
-access_handler_callback (void *cls, struct MHD_Connection *connection,
-                         const char *url, const char *method,
-                         const char *version, const char *upload_data,
-                         size_t * upload_data_size, void **con_cls)
+access_handler_callback (void *cls,
+                        struct MHD_Connection *connection,
+                         const char *url,
+                        const char *method,
+                         const char *version,
+                        const char *upload_data,
+                         size_t * upload_data_size,
+                        void **con_cls)
 {
   static int dummy;
   static const struct Entry map[] = {
@@ -290,12 +294,8 @@ static void
 run_daemon (void *cls)
 {
   struct MHD_Daemon *daemon_handle = cls;
-  const struct GNUNET_SCHEDULER_TaskContext *tc;
 
   http_task = NULL;
-  tc = GNUNET_SCHEDULER_get_task_context ();
-  if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
-    return;
   GNUNET_assert (MHD_YES == MHD_run (daemon_handle));
   http_task = prepare_daemon (daemon_handle);
 }
@@ -354,12 +354,12 @@ server_start ()
   if ((0 == port) || (port > UINT16_MAX))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                _("Invalid port number %llu.  Exiting.\n"),
+                _("Invalid port number %u.  Exiting.\n"),
                 port);
     return GNUNET_SYSERR;
   }
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-              _("Businesscard HTTP server starts on %llu\n"),
+              _("Businesscard HTTP server starts on %u\n"),
               port);
   daemon_handle = MHD_start_daemon (MHD_USE_DUAL_STACK | MHD_USE_DEBUG,
                                     (uint16_t) port,
@@ -499,9 +499,8 @@ run (void *cls,
   if (GNUNET_OK !=
       server_start ())
     return;
-  GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
-                                &server_stop,
-                                NULL);
+  GNUNET_SCHEDULER_add_shutdown (&server_stop,
+                                NULL);
 }