[Spice-devel] [PATCH spice 2/2] server: add "port" channel support

Marc-André Lureau marcandre.lureau at gmail.com
Mon Dec 3 10:37:10 PST 2012

Hi Hans,

On Sun, Dec 2, 2012 at 12:26 PM, Hans de Goede <hdegoede at redhat.com> wrote:

> I think that you also need to change
> spicevmc_red_channel_alloc_msg_rcv_buf,
> because now it will allocate a spice_char_device_write_buffer to hold the
> event message, which seems the wrong thing to do, and since when handling
> the event message you don't set  state->recv_from_client_buf = NULL, the
> next message received on the channel will trigger this assert:
>     assert(!state->recv_from_**client_buf);
> In spicevmc_red_channel_alloc_**msg_rcv_buf, I think this does not happen
> in your testing since you only close the port once, and then send no
> more data.

It's a valid concern but it doesn't happen, because it is released by the
following callback:

(gdb) bt
#0  spicevmc_red_channel_release_msg_rcv_buf (rcc=0x55555666a3f0, type=201,
    msg=0x5555568f0330 "\002\327q\363\377\177") at spicevmc.c:338
#1  0x00007ffff40df010 in red_peer_handle_incoming (stream=0x555556932770,
    handler=0x55555666e500) at red_channel.c:280
#2  0x00007ffff40df0ae in red_channel_client_receive (rcc=0x55555666a3f0)
    at red_channel.c:294
#3  0x00007ffff40e1e44 in red_channel_client_event (fd=28, event=1,
    data=0x55555666a3f0) at red_channel.c:1204SPICE_MSG_PORT_INIT, item);


Marc-André Lureau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20121203/18eacd9d/attachment.html>

More information about the Spice-devel mailing list