[Spice-devel] [PATCH 28/35] vdi port: redesign.
Alexander Larsson
alexl at redhat.com
Mon May 17 02:21:06 PDT 2010
On Wed, 2010-05-12 at 13:32 +0200, Gerd Hoffmann wrote:
> - while (reds->agent_state.plug_ref != INVALID_VD_OBJECT_REF) {
> + sif = SPICE_CONTAINEROF(vdagent->base.sif, SpiceVDIPortInterface, base);
> + for (;;) {
Changing a while to for(;;;) doesn't seem right. We can still hit:
read_from_vdi_port()-> dispatch_vdi_port_data()-> default: ->
reds_agent_remove()
which used to set plug_ref to INVALID_VD_OBJECT_REF, only now it sets
connected to 0 instead, so we should check that.
> + if (sif->state)
> + sif->state(vdagent, reds->agent_state.connected);
> reds->agent_state.plug_generation++;
Missing brackets around block.
> + if (sif->state)
> + sif->state(vdagent, state->connected);
Here too.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl at redhat.com alexander.larsson at gmail.com
He's an oversexed ninja vagrant on the run. She's a chain-smoking red-headed
opera singer in the wrong place at the wrong time. They fight crime!
More information about the Spice-devel
mailing list