GDBusMessage: fast-path encoding of fixed arrays
[platform/upstream/glib.git] / gio / tests / httpd.c
index 6ad0b43..41bc6c8 100644 (file)
@@ -12,7 +12,7 @@ static GOptionEntry cmd_entries[] = {
 static void
 send_error (GOutputStream *out,
            int error_code,
-           char *reason)
+           const char *reason)
 {
   char *res;
 
@@ -72,6 +72,7 @@ handler (GThreadedSocketService *service,
       *tmp = 0;
       version = tmp + 1;
     }
+  version = version; /* To avoid -Wunused-but-set-variable */
 
   query = strchr (escaped, '?');
   if (query != NULL)
@@ -145,9 +146,6 @@ main (int argc, char *argv[])
   GOptionContext *context;
   GError *error = NULL;
 
-  g_type_init ();
-  g_thread_init (NULL);
-
   context = g_option_context_new ("<http root dir> - Simple HTTP server");
   g_option_context_add_main_entries (context, cmd_entries, NULL);
   if (!g_option_context_parse (context, &argc, &argv, &error))
@@ -164,7 +162,7 @@ main (int argc, char *argv[])
 
   root = g_strdup (argv[1]);
 
-  service = g_threaded_socket_service_new ();
+  service = g_threaded_socket_service_new (10);
   if (!g_socket_listener_add_inet_port (G_SOCKET_LISTENER (service),
                                        port,
                                        NULL,