Re: [Spice-devel] [PATCH v2] Revert if to make code more readable
On 09/20/2016 10:05 AM, Frediano Ziglio wrote: Keep all code to send SPICE_MSG_LIST together. Signed-off-by: Frediano ZiglioAck. --- server/dcc-send.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) Changed since v1: - moved comment diff --git a/server/dcc-send.c b/server/dcc-send.c index 1d05c68..32c6f17 100644 --- a/server/dcc-send.c +++ b/server/dcc-send.c @@ -283,14 +283,15 @@ static void send_free_list(RedChannelClient *rcc) dcc_pixmap_cache_hit(dcc, dcc->priv->send_data.pixmap_cache_items[i], ); } -if (free_list->wait.header.wait_count) { -red_channel_client_init_send_data(rcc, SPICE_MSG_LIST, NULL); -} else { /* only one message, no need for a list */ +if (!free_list->wait.header.wait_count) { +/* only one message, no need for a list */ red_channel_client_init_send_data(rcc, SPICE_MSG_DISPLAY_INVAL_LIST, NULL); spice_marshall_msg_display_inval_list(urgent_marshaller, free_list->res); return; } +red_channel_client_init_send_data(rcc, SPICE_MSG_LIST, NULL); + inval_m = spice_marshaller_get_submarshaller(urgent_marshaller); marshal_sub_msg_inval_list(inval_m, free_list); ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH v2] Revert if to make code more readable
> Looks fine to me, but the commit log should say "Invert", not "Revert". > > Aside from that: > Acked-by: Jonathon Jongsma> You are right... unfortunately was already committed Frediano > > On Tue, 2016-09-20 at 08:05 +0100, Frediano Ziglio wrote: > > Keep all code to send SPICE_MSG_LIST together. > > > > Signed-off-by: Frediano Ziglio > > --- > > server/dcc-send.c | 7 --- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > Changed since v1: > > - moved comment > > > > diff --git a/server/dcc-send.c b/server/dcc-send.c > > index 1d05c68..32c6f17 100644 > > --- a/server/dcc-send.c > > +++ b/server/dcc-send.c > > @@ -283,14 +283,15 @@ static void send_free_list(RedChannelClient > > *rcc) > > dcc_pixmap_cache_hit(dcc, dcc->priv- > > >send_data.pixmap_cache_items[i], ); > > } > > > > -if (free_list->wait.header.wait_count) { > > -red_channel_client_init_send_data(rcc, SPICE_MSG_LIST, > > NULL); > > -} else { /* only one message, no need for a list */ > > +if (!free_list->wait.header.wait_count) { > > +/* only one message, no need for a list */ > > red_channel_client_init_send_data(rcc, > > SPICE_MSG_DISPLAY_INVAL_LIST, NULL); > > spice_marshall_msg_display_inval_list(urgent_marshaller, > > free_list->res); > > return; > > } > > > > +red_channel_client_init_send_data(rcc, SPICE_MSG_LIST, NULL); > > + > > inval_m = spice_marshaller_get_submarshaller(urgent_marshaller); > > marshal_sub_msg_inval_list(inval_m, free_list); > > > ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH v2] Revert if to make code more readable
Looks fine to me, but the commit log should say "Invert", not "Revert". Aside from that: Acked-by: Jonathon JongsmaOn Tue, 2016-09-20 at 08:05 +0100, Frediano Ziglio wrote: > Keep all code to send SPICE_MSG_LIST together. > > Signed-off-by: Frediano Ziglio > --- > server/dcc-send.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > Changed since v1: > - moved comment > > diff --git a/server/dcc-send.c b/server/dcc-send.c > index 1d05c68..32c6f17 100644 > --- a/server/dcc-send.c > +++ b/server/dcc-send.c > @@ -283,14 +283,15 @@ static void send_free_list(RedChannelClient > *rcc) > dcc_pixmap_cache_hit(dcc, dcc->priv- > >send_data.pixmap_cache_items[i], ); > } > > -if (free_list->wait.header.wait_count) { > -red_channel_client_init_send_data(rcc, SPICE_MSG_LIST, > NULL); > -} else { /* only one message, no need for a list */ > +if (!free_list->wait.header.wait_count) { > +/* only one message, no need for a list */ > red_channel_client_init_send_data(rcc, > SPICE_MSG_DISPLAY_INVAL_LIST, NULL); > spice_marshall_msg_display_inval_list(urgent_marshaller, > free_list->res); > return; > } > > +red_channel_client_init_send_data(rcc, SPICE_MSG_LIST, NULL); > + > inval_m = spice_marshaller_get_submarshaller(urgent_marshaller); > marshal_sub_msg_inval_list(inval_m, free_list); > ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel