Commit Graph

18 Commits

Author SHA1 Message Date
Francois Gouget
cbc4e07682 server: Rename DISPLAY_CLIENT_TIMEOUT and de-duplicate it
Given that it is used for both cursor and display, COMMON_CLIENT_TIMEOUT
seems more appropriate. Also define it only in red-worker.h.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-12-14 10:53:40 +00:00
Frediano Ziglio
f31536802a worker: change red_worker_new_channel result to CommonChannel*
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-12-03 10:41:46 +00:00
Marc-André Lureau
82fa233fa6 server: rename _tmpl files
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-26 13:33:36 +00:00
Pavel Grunt
0426524546 syntax-check: Add missing #include <config.h> 2015-11-09 19:41:28 +01:00
Fabiano Fidêncio
3cc2513d33 cursor: fix wrong logic when initializing the channel
It's a regression introduced by commit e601e920bd. 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>
2015-11-04 11:20:48 +00:00
Marc-André Lureau
d8f89125fb Various changes in RedWorker and CursorChannel related to error and warning messages.
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-04 10:27:09 +00:00
Marc-André Lureau
d9a0629bc1 Store QXLInstance in CursorItem
Doing so allows us to remove the extra QXLInstance parameter from
cursor_item_unref() and makes the code a bit cleaner.

Also add cursor_item_ref().

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-03 09:53:46 +00:00
Marc-André Lureau
e601e920bd server: make more of cursor private
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-03 09:07:18 +00:00
Marc-André Lureau
c9e3b058e4 server: make cursor channel private
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-03 09:06:55 +00:00
Marc-André Lureau
0eedafaf0c Various minor style changes to worker and cursor channel
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 17:55:59 +00:00
Marc-André Lureau
2eb732bd4d __new_channel -> red_worker_new_channel()
Rename and lightly refactor the function that creates new common
channels for RedWorker (essentially Cursor and Display channels).

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 17:15:18 +00:00
Marc-André Lureau
2d934ed82e 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@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 16:56:13 +00:00
Marc-André Lureau
7b39f818b8 Remove a couple single-use static functions
red_cursor_marshall_inval(), red_migrate_cursor() and
on_new_cursor_channel() were short functions that were each only called
from a single location, so there's no need for them to be separate
functions.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 08:48:00 +00:00
Marc-André Lureau
30c9ff7a8f CursorChannel* arg in cursor_channel_client_new()
Instead of passing a CommonChannel* argument, use CursorChannel* since
this function is only valid for CursorChannels.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 08:47:56 +00:00
Marc-André Lureau
591f39e7cc common_channel_client_create -> common_channel_new_client
Rename and re-order the initial arguments to make this function look and
act more like a method of the CommonChannel class.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 08:47:53 +00:00
Marc-André Lureau
8f5a5582c0 Change red_marshall_verb() to accept a VerbItem
Instead of passing a verb enumeration value, pass the verb pipe item

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 08:47:50 +00:00
Marc-André Lureau
26005ddb04 Remove unused parameter from cursor_channel_new()
cursor_channel_new() is only called from one location, and always passes
FALSE as the value for the 'migrate' paramater. In addition, this
parameter is not used within the function. Remove it.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 08:47:45 +00:00
Marc-André Lureau
070e0fcd63 worker: move some cursor code to cursor-channel.c
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-10-29 09:58:25 +00:00