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 
       [email protected]            [email protected] 
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! 

_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to