Hi,
So all in all enabling open / close event for the agent channel
is a BAD (tm) idea. However as stated in the start for usbredir
actually getting client connect / disconnect events is desirable,
so that usbredir can reset its parser to start fresh with the
new client. And so that ic can "unplug" the redirected usbdevice
from the vm when the client disconnects, since that is what
essentially happens then.
Agree.
Thus I'm going to send a patch soon, which adds a
state callback to the SpiceCharDeviceInterface of spice-qemu-char,
but turns this into a no-op for anything but usbredir. Alternatively
we could make it a no-op only for vdagent type spicevmc chardevs,
but that requires an analysis like the one above to be done
for the smartcard stuff.
Since I'm not going to do that check, I think your suggestion sounds
fine. I think the vdagent code could use some cleanup too, but that's
a different subject (I'm looking at agent_state.connected).
I tend to think that we should special case the vdagent. As far I know
the spice-server will just pass through the card control messages from
the guest to the client and back without looking at the data stream
(Alon correct me if I'm wrong), i.e. we have a model more like usbredir
than like vdagent. I think it makes sense to signal open/close here
(and probably map that into card insert/remove events in
ccid-card-passthru.c).
cheers,
Gerd
_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel