]> Pileus Git - ~andy/gtk/commitdiff
Move send_error up
authorAlexander Larsson <alexl@redhat.com>
Thu, 25 Nov 2010 12:08:13 +0000 (13:08 +0100)
committerAlexander Larsson <alexl@redhat.com>
Thu, 25 Nov 2010 21:09:33 +0000 (22:09 +0100)
gdk/broadway/gdkdisplay-broadway.c

index 0edda8da47c5d336d94bdc7807bcdc305a8e0152..60ea465b7c2ad881622e2e8eae7f2b015eb2d0a7 100644 (file)
@@ -197,6 +197,26 @@ got_input (GInputStream *stream,
                                       (GAsyncReadyCallback)got_input, request);
 }
 
+static void
+send_error (HttpRequest *request,
+           int error_code,
+           const char *reason)
+{
+  char *res;
+
+  res = g_strdup_printf ("HTTP/1.0 %d %s\r\n\r\n"
+                        "<html><head><title>%d %s</title></head>"
+                        "<body>%s</body></html>",
+                        error_code, reason,
+                        error_code, reason,
+                        reason);
+  /* TODO: This should really be async */
+  g_output_stream_write_all (g_io_stream_get_output_stream (G_IO_STREAM (request->connection)),
+                            res, strlen (res), NULL, NULL, NULL);
+  g_free (res);
+  http_request_free (request);
+}
+
 static void
 start_input (HttpRequest *request)
 {
@@ -333,26 +353,6 @@ start_output (HttpRequest *request)
   http_request_free (request);
 }
 
-static void
-send_error (HttpRequest *request,
-           int error_code,
-           const char *reason)
-{
-  char *res;
-
-  res = g_strdup_printf ("HTTP/1.0 %d %s\r\n\r\n"
-                        "<html><head><title>%d %s</title></head>"
-                        "<body>%s</body></html>",
-                        error_code, reason,
-                        error_code, reason,
-                        reason);
-  /* TODO: This should really be async */
-  g_output_stream_write_all (g_io_stream_get_output_stream (G_IO_STREAM (request->connection)),
-                            res, strlen (res), NULL, NULL, NULL);
-  g_free (res);
-  http_request_free (request);
-}
-
 static void
 send_data (HttpRequest *request,
             const char *mimetype,