Hi, On Mon, Dec 12, 2016 at 10:46:34PM +0100, Victor Toso wrote: > and maybe move the variable definition to the top? > > Acked-by: Victor Toso <victortoso@xxxxxxxxxx> > > toso I'm removing the ack from this patch. Sorry for the noise. The issue is around the whole solution in verifying reliably the lock/unlock status of the session. There is race in vdagent.exe in regard of receiving the sessions notifications, trying to summarize it bellow: Normal workflow: 1) User clicks to Lock the session 2) vdagent receives: WTS_SESSION_LOCK and updates its _session_is_locked 3) vdagent receives: CONTROL_ACTION -> CONTROL_DESKTOP_SWITCH which will set its _desktop_switch to true, making the input_desktop_message_loop() to end, which will end up calling WTSUnRegisterSessionNotification() in the process; Race workflow: (3) happens before (2). That means, WTS_SESSION_LOCK will be ignored and its _session_is_locked will not be updated. Session will be locked but vdagent will still accept file-transfers :( The solution for the moment is removing the handler in vdagent for WTS_SESSION_LOCK and WTS_SESSION_UNLOCK, and receive this information from vdservice, always. This will be v2 of my previous patch [0] plus removing some code in vdagent. I hope to do it now, do some testing and send it soon. Cheers, toso PS: A real solution is improving the design of windows vdagent to be more like linux vdagent, IMHO :)
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel