[Spice-devel] agent channel behavior in case of unexpected client / agent close

Alon Levy alevy at redhat.com
Thu Jul 21 10:34:47 PDT 2011


On Thu, Jul 21, 2011 at 07:15:41PM +0200, Gerd Hoffmann wrote:
>   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).
> 

Correct about being similar to usbredir. I don't mind dealing with making
sure it works right with smartcard (if it doesn't Just Work) right after Hans
writes the patch :)

There is already logic for disconnecting the reader usb device, it is either on
request from the client (for a specific reader) or when the client disconnects
(for all readers - this needs to be fixed of course for multiclient..).

> cheers,
>   Gerd
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list