[Spice-devel] [PATCH spice-gtk] channel: rely on couroutine instead of channel state
Hans de Goede
hdegoede at redhat.com
Sun Dec 2 03:35:52 PST 2012
Hi,
On 11/30/2012 09:17 PM, Marc-André Lureau wrote:
>
>
> On Fri, Nov 30, 2012 at 9:12 PM, Marc-André Lureau <marcandre.lureau at gmail.com <mailto:marcandre.lureau at gmail.com>> wrote:
>
> spice_channel_send_link(channel);
> + spice_channel_recv_link_hdr(channel);
> + spice_channel_recv_link_msg(channel);
> + spice_channel_recv_auth(channel);
>
>
> At this point I am tempted to make just one function channel_handle_link(). The current function splitting is not really necessary, and looks weird: the client actually also sends messages in those functions...
Sounds like a nice cleanup to me. Or maybe further
split the recv_ functions into a recv_ and send_next_bit
parts and then have a channel_handle_link()
calling all the send_ and recv_ parts? I think that might
end up more readable then a single large function and
the compiler should inline it all anyways (since it is all
called from only 1 place).
Regards,
Hans
More information about the Spice-devel
mailing list