discover-server: Add reference to server in struct client
[petitboot] / discover / discover-server.c
index bafcb77630ec9379b48eb3c8bb2ddc80c0c50ef1..7633134c2ea639b1ac410564465f8c2a9ca2dfee 100644 (file)
@@ -29,6 +29,7 @@ struct discover_server {
 };
 
 struct client {
+       struct discover_server *server;
        struct list_item list;
        int fd;
 };
@@ -165,6 +166,7 @@ static int discover_server_process_connection(void *arg)
        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);