[Spice-commits] server/cursor-channel.c server/cursor-channel.h server/red_worker.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Fri Oct 30 10:04:10 PDT 2015
server/cursor-channel.c | 4 +++-
server/cursor-channel.h | 2 +-
server/red_worker.c | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 2d934ed82e22d3317186e5f63e28c5105b5ea2d2
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date: Fri Oct 30 11:08:25 2015 -0500
Make cursor_channel_disconnect a CursorChannel method
The first argument should be CursorChannel* rather than RedChannel*
since it's essentially a CursorChannel method.
Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/cursor-channel.c b/server/cursor-channel.c
index 7ab9285..b984225 100644
--- a/server/cursor-channel.c
+++ b/server/cursor-channel.c
@@ -135,8 +135,10 @@ static void red_reset_cursor_cache(RedChannelClient *rcc)
red_cursor_cache_reset(RCC_TO_CCC(rcc), CLIENT_CURSOR_CACHE_SIZE);
}
-void cursor_channel_disconnect(RedChannel *channel)
+void cursor_channel_disconnect(CursorChannel *cursor_channel)
{
+ RedChannel *channel = (RedChannel *)cursor_channel;
+
if (!channel || !red_channel_is_connected(channel)) {
return;
}
diff --git a/server/cursor-channel.h b/server/cursor-channel.h
index 1914226..293cfc1 100644
--- a/server/cursor-channel.h
+++ b/server/cursor-channel.h
@@ -78,7 +78,7 @@ typedef struct CursorChannel {
G_STATIC_ASSERT(sizeof(CursorItem) <= QXL_CURSUR_DEVICE_DATA_SIZE);
CursorChannel* cursor_channel_new (RedWorker *worker);
-void cursor_channel_disconnect (RedChannel *channel);
+void cursor_channel_disconnect (CursorChannel *cursor_channel);
void cursor_channel_reset (CursorChannel *cursor);
void cursor_channel_process_cmd (CursorChannel *cursor, RedCursorCmd *cursor_cmd,
uint32_t group_id);
diff --git a/server/red_worker.c b/server/red_worker.c
index 2edfef5..574414c 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -8828,7 +8828,7 @@ static inline void flush_cursor_commands(RedWorker *worker)
red_channel_send(channel);
if (red_get_monotonic_time() >= end_time) {
spice_warning("flush cursor timeout");
- cursor_channel_disconnect(channel);
+ cursor_channel_disconnect(worker->cursor_channel);
worker->cursor_channel = NULL;
} else {
sleep_count++;
More information about the Spice-commits
mailing list