]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
boot-server: make update handling asyncrhonous
authorRay Strode <rstrode@redhat.com>
Thu, 7 Oct 2010 19:34:08 +0000 (15:34 -0400)
committerRay Strode <rstrode@redhat.com>
Thu, 7 Oct 2010 19:42:49 +0000 (15:42 -0400)
This call needs to be cheap since some distros
do a ton of updates.

src/ply-boot-server.c

index b49f9b9f7d25a6db0f3057a96c548e7844318d44..3fbe81000d10ea924d2a481f0f211401ef9535f1 100644 (file)
@@ -398,10 +398,18 @@ ply_boot_connection_on_request (ply_boot_connection_t *connection)
 
   if (strcmp (command, PLY_BOOT_PROTOCOL_REQUEST_TYPE_UPDATE) == 0)
     {
+
+      if (!ply_write (connection->fd,
+                      PLY_BOOT_PROTOCOL_RESPONSE_TYPE_ACK,
+                      strlen (PLY_BOOT_PROTOCOL_RESPONSE_TYPE_ACK)))
+        ply_error ("could not write bytes: %m");
+
       ply_trace ("got update request");
       if (server->update_handler != NULL)
         server->update_handler (server->user_data, argument, server);
       free (argument);
+      free (command);
+      return;
     }
   else if (strcmp (command, PLY_BOOT_PROTOCOL_REQUEST_TYPE_SYSTEM_INITIALIZED) == 0)
     {