summaryrefslogtreecommitdiff
path: root/server/cursor-channel.c
diff options
context:
space:
mode:
authorFabiano FidĂȘncio <fidencio@redhat.com>2015-11-04 12:18:32 +0100
committerFrediano Ziglio <fziglio@redhat.com>2015-11-04 11:20:48 +0000
commit3cc2513d33c19875711c651a18eb5ae4bdb7fa96 (patch)
treea4d295c6505b2e8544ee079111a3903435555e34 /server/cursor-channel.c
parentcf3ca136e609421f182606d8e7eaaebe139d1d24 (diff)
cursor: fix wrong logic when initializing the channel
It's a regression introduced by commit e601e920bd5. The logic error was introduced when trying to achieve the following code[0]. but rewritten to prefer an early return, which was wrogly negated. [0]: if (cursor_is_connected(worker) && !COMMON_CHANNEL(worker->cursor_channel)->during_target_migrate) { red_channel_pipes_add_type(RED_CHANNEL(worker->cursor_channel), PIPE_ITEM_TYPE_CURSOR_INIT); } Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
Diffstat (limited to 'server/cursor-channel.c')
-rw-r--r--server/cursor-channel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/cursor-channel.c b/server/cursor-channel.c
index 5995aa5b..6d648b1f 100644
--- a/server/cursor-channel.c
+++ b/server/cursor-channel.c
@@ -556,7 +556,7 @@ void cursor_channel_init(CursorChannel *cursor, CursorChannelClient *client)
{
spice_return_if_fail(cursor);
- if (red_channel_is_connected(&cursor->common.base)
+ if (!red_channel_is_connected(&cursor->common.base)
|| COMMON_CHANNEL(cursor)->during_target_migrate) {
spice_debug("during_target_migrate: skip init");
return;