From 7bcdc4104da6db55af3275da3e0ec86996c0f6ab Mon Sep 17 00:00:00 2001 From: Giuseppe Piscitelli Date: Wed, 7 Oct 2026 17:09:50 +0200 Subject: preflight: serialize device visibility and notifications Publish device visibility and the attached notification under device_list_mutex, then acquire client_list_mutex in the same order as device removal. Do not notify clients if preflight completes after the device has disappeared. Assisted-by: OpenAI Codex --- src/client.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/client.c') diff --git a/src/client.c b/src/client.c index 2ac04bf..96ab507 100644 --- a/src/client.c +++ b/src/client.c @@ -988,7 +988,6 @@ void client_device_add(struct device_info *dev) { mutex_lock(&client_list_mutex); usbmuxd_log(LL_DEBUG, "client_device_add: id %d, location 0x%x, serial %s", dev->id, dev->location, dev->serial); - device_set_visible(dev->id); FOREACH(struct mux_client *client, &client_list) { if(client->state == CLIENT_LISTEN) send_device_add(client, dev); -- cgit v1.1-32-gdbae