]> git.ozlabs.org Git - petitboot/commitdiff
discover: Don't resend all options to all clients
authorJeremy Kerr <jk@ozlabs.org>
Tue, 7 May 2013 08:48:41 +0000 (16:48 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 7 May 2013 08:53:30 +0000 (16:53 +0800)
Currently, when a new UI client connects, we send all boot options to
all clients. This results in existing clients getting duplicate add
events.

Instead, we only want to send existing boot options to the new client.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/discover-server.c

index 3f08152601a05640b1b72996cc5575d549518e89..ca20113a22267d8ca23b0bd25c472234bd3682b7 100644 (file)
@@ -225,9 +225,8 @@ static int discover_server_process_connection(void *arg)
                write_device_add_message(server, client, device->device);
 
                list_for_each_entry(&device->boot_options, opt, list)
                write_device_add_message(server, client, device->device);
 
                list_for_each_entry(&device->boot_options, opt, list)
-                       discover_server_notify_boot_option_add(server,
+                       write_boot_option_add_message(server, client,
                                        opt->option);
                                        opt->option);
-
        }
 
        waiter_register(server->waitset, client->fd, WAIT_IN,
        }
 
        waiter_register(server->waitset, client->fd, WAIT_IN,