[Spice-devel] [PATCH spice-server 1/2] red-channel-client: Remove vec field from OutgoingHandler
Jonathon Jongsma
jjongsma at redhat.com
Tue Feb 14 17:44:34 UTC 2017
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
On Fri, 2017-02-10 at 14:02 +0000, Frediano Ziglio wrote:
> This was always set to vec_buf.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/red-channel-client-private.h | 3 +--
> server/red-channel-client.c | 2 --
> 2 files changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/server/red-channel-client-private.h b/server/red-
> channel-client-private.h
> index d01cdbd..35c20a9 100644
> --- a/server/red-channel-client-private.h
> +++ b/server/red-channel-client-private.h
> @@ -43,9 +43,8 @@ typedef struct RedChannelClientConnectivityMonitor
> {
> typedef struct OutgoingHandler {
> OutgoingHandlerInterface *cb;
> void *opaque;
> - struct iovec vec_buf[IOV_MAX];
> + struct iovec vec[IOV_MAX];
> int vec_size;
> - struct iovec *vec;
> int pos;
> int size;
> } OutgoingHandler;
> diff --git a/server/red-channel-client.c b/server/red-channel-
> client.c
> index 0002951..5ef6fd4 100644
> --- a/server/red-channel-client.c
> +++ b/server/red-channel-client.c
> @@ -1007,7 +1007,6 @@ static void red_peer_handle_outgoing(RedsStream
> *stream, OutgoingHandler *handle
> }
>
> if (handler->size == 0) {
> - handler->vec = handler->vec_buf;
> handler->size = handler->cb->get_msg_size(handler->opaque);
> if (!handler->size) { // nothing to be sent
> return;
> @@ -1039,7 +1038,6 @@ static void red_peer_handle_outgoing(RedsStream
> *stream, OutgoingHandler *handle
> /* reset handler before calling on_msg_done, since
> it
> * can trigger another call to
> red_peer_handle_outgoing (when
> * switching from the urgent marshaller to the main
> one */
> - handler->vec = handler->vec_buf;
> handler->pos = 0;
> handler->size = 0;
> handler->cb->on_msg_done(handler->opaque);
More information about the Spice-devel
mailing list