mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-07 11:55:10 +00:00
red-channel-client: Do not allocate iovec array statically in the class
This array is just used locally in red_channel_client_handle_outgoing so declare it there. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
f1050bfc76
commit
0e5c4880ed
@ -101,8 +101,6 @@ typedef struct RedChannelClientConnectivityMonitor {
|
||||
} RedChannelClientConnectivityMonitor;
|
||||
|
||||
typedef struct OutgoingMessageBuffer {
|
||||
struct iovec vec[IOV_MAX];
|
||||
int vec_size;
|
||||
int pos;
|
||||
int size;
|
||||
} OutgoingMessageBuffer;
|
||||
@ -1081,10 +1079,11 @@ static void red_channel_client_handle_outgoing(RedChannelClient *rcc)
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
buffer->vec_size =
|
||||
red_channel_client_prepare_out_msg(rcc, buffer->vec, G_N_ELEMENTS(buffer->vec),
|
||||
struct iovec vec[IOV_MAX];
|
||||
int vec_size =
|
||||
red_channel_client_prepare_out_msg(rcc, vec, G_N_ELEMENTS(vec),
|
||||
buffer->pos);
|
||||
n = red_stream_writev(stream, buffer->vec, buffer->vec_size);
|
||||
n = red_stream_writev(stream, vec, vec_size);
|
||||
if (n == -1) {
|
||||
switch (errno) {
|
||||
case EAGAIN:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user