move during_target_migrate out of common_graphics_channel_new_client

This reduces the number of arguments that need to be passed to the
function, and also avoids changing a different object within a function
that is supposed to just create a new object

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
Frediano Ziglio 2016-05-06 22:01:24 +01:00 committed by Jonathon Jongsma
parent c699e4db3d
commit eef8d0d8a3
4 changed files with 3 additions and 5 deletions

View File

@ -390,13 +390,13 @@ static CursorChannelClient* cursor_channel_client_new(CursorChannel *cursor,
(CursorChannelClient*)common_graphics_channel_new_client(&cursor->common,
sizeof(CursorChannelClient),
client, stream,
mig_target,
FALSE,
common_caps,
num_common_caps,
caps,
num_caps);
spice_return_val_if_fail(ccc != NULL, NULL);
cursor->common.during_target_migrate = mig_target;
ring_init(&ccc->cursor_cache_lru);
ccc->cursor_cache_available = CLIENT_CURSOR_CACHE_SIZE;

View File

@ -366,9 +366,10 @@ DisplayChannelClient *dcc_new(DisplayChannel *display,
dcc = (DisplayChannelClient*)common_graphics_channel_new_client(
COMMON_GRAPHICS_CHANNEL(display), sizeof(DisplayChannelClient),
client, stream, mig_target, TRUE,
client, stream, TRUE,
common_caps, num_common_caps,
caps, num_caps);
display->common.during_target_migrate = mig_target;
dcc->id = display->common.qxl->id;
spice_return_val_if_fail(dcc, NULL);
spice_info("New display (client %p) dcc %p stream %p", client, dcc, stream);

View File

@ -445,7 +445,6 @@ CommonGraphicsChannelClient *common_graphics_channel_new_client(CommonGraphicsCh
int size,
RedClient *client,
RedsStream *stream,
int mig_target,
int monitor_latency,
uint32_t *common_caps,
int num_common_caps,
@ -458,7 +457,6 @@ CommonGraphicsChannelClient *common_graphics_channel_new_client(CommonGraphicsCh
if (!rcc) {
return NULL;
}
common->during_target_migrate = mig_target;
return (CommonGraphicsChannelClient*)rcc;
}

View File

@ -104,7 +104,6 @@ CommonGraphicsChannelClient *common_graphics_channel_new_client(CommonGraphicsCh
int size,
RedClient *client,
RedsStream *stream,
int mig_target,
int monitor_latency,
uint32_t *common_caps,
int num_common_caps,