From: Jeremy Kerr Date: Tue, 7 May 2013 08:48:41 +0000 (+0800) Subject: discover: Don't resend all options to all clients X-Git-Tag: v1.0.0~656 X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=commitdiff_plain;h=64c7065659bd939564356d688dcd24c65e02d57f;hp=1920721aa011923555d95fc3b6a4378064a991ca discover: Don't resend all options to all clients 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 --- diff --git a/discover/discover-server.c b/discover/discover-server.c index 3f08152..ca20113 100644 --- a/discover/discover-server.c +++ b/discover/discover-server.c @@ -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) - discover_server_notify_boot_option_add(server, + write_boot_option_add_message(server, client, opt->option); - } waiter_register(server->waitset, client->fd, WAIT_IN,