};
struct client {
+ struct discover_server *server;
struct list_item list;
int fd;
};
static int discover_server_process_message(void *arg)
{
struct pb_protocol_message *message;
+ struct boot_command *boot_command;
struct client *client = arg;
message = pb_protocol_read_message(client, client->fd);
return 0;
}
- /* todo: process boot message */
+ boot_command = pb_protocol_deserialise_boot_command(client, message);
+ if (!boot_command) {
+ pb_log("%s: no boot command?", __func__);
+ return 0;
+ }
+
+ /* todo: pass boot_command to client->server->device_handler */
+
return 0;
}
talloc_set_destructor(client, client_destructor);
client->fd = fd;
+ client->server = server;
/* send existing devices to client */
n_devices = device_handler_get_device_count(server->device_handler);