summaryrefslogtreecommitdiffstats
path: root/server
Commit message (Collapse)AuthorAgeFilesLines
* server: make more of cursor privateMarc-André Lureau2015-11-035-64/+89
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* server: make cursor channel privateMarc-André Lureau2015-11-036-70/+94
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* Move pipe item enumerations out of red_worker.hMarc-André Lureau2015-11-023-18/+26
| | | | | | | | | | Move the cursor-specific pipe item types to cursor-channel.h, and the display-specific types to red_worker.c. Only leave the common definitions in red_worker.h. This prepares for splitting the display channel into a separate file. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* server: move display_channel_client_create() to dcc_new()Marc-André Lureau2015-11-024-65/+83
| | | | | | | Move function from server/red_worker.c to new server/display-channel.c. Acked-by: Fabiano Fidêncio <fidencio@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
* tree: move that to a separate unitMarc-André Lureau2015-11-025-255/+311
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: s/repoll/poll_triesMarc-André Lureau2015-11-021-12/+12
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* Various minor style changes to worker and cursor channelMarc-André Lureau2015-10-302-17/+25
| | | | | Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: remove assertion on alloc_drawableMarc-André Lureau2015-10-301-1/+3
| | | | | | | | | | | There is no guarantee in the code that this can't be hit, so we should cope with it (the condition can be reached easily by running the server without waiting for blocked clients or pipe size) The following commit will attempt to address this. Acked-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
* __new_channel -> red_worker_new_channel()Marc-André Lureau2015-10-303-59/+45
| | | | | | | | 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>
* Make cursor_channel_disconnect a CursorChannel methodMarc-André Lureau2015-10-303-3/+5
| | | | | | | | 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>
* server: Hide the MJPEG encoder internals from red_worker.cFrancois Gouget2015-10-303-42/+59
| | | | Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
* server: Move the MJPEG encoder functions to mjpeg_encoder.cFrancois Gouget2015-10-303-75/+78
| | | | | | | Note that this requires some adjustments to the encode_frame() parameters to avoid red_worker-specific types. Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
* server: Move mjpeg_encoder_new() to the end of mjpeg_encoder.cFrancois Gouget2015-10-301-40/+34
| | | | | | This also allows getting rid of a couple of forward definitions. Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
* server: Remove an unnecessary cast in encode_frame()Francois Gouget2015-10-301-2/+1
| | | | Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
* Remove a couple single-use static functionsMarc-André Lureau2015-10-302-34/+15
| | | | | | | | | | 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>
* CursorChannel* arg in cursor_channel_client_new()Marc-André Lureau2015-10-303-5/+4
| | | | | | | | 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>
* common_channel_client_create -> common_channel_new_clientMarc-André Lureau2015-10-303-32/+32
| | | | | | | | 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>
* Change red_marshall_verb() to accept a VerbItemMarc-André Lureau2015-10-303-6/+6
| | | | | | | 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>
* Remove unused parameter from cursor_channel_new()Marc-André Lureau2015-10-303-3/+3
| | | | | | | | | 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>
* server: remove undefined declarationFrediano Ziglio2015-10-291-1/+0
| | | | Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* Replace now() with get_mononotonic_time()Marc-André Lureau2015-10-296-56/+22
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* utils: add red_get_monotonic_time()Marc-André Lureau2015-10-293-14/+37
|
* worker: avoid to use constant directly for capabilities sizeFrediano Ziglio2015-10-292-2/+6
| | | | Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* Move red_bitmap_utils.h->tmpl.cMarc-André Lureau2015-10-293-4/+4
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: move some cursor code to cursor-channel.cMarc-André Lureau2015-10-295-549/+625
| | | | | | 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>
* worker: rename some cursor functionsMarc-André Lureau2015-10-291-15/+15
| | | | | | 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>
* worker: change CursorItem memory allocationMarc-André Lureau2015-10-292-54/+11
| | | | | | | Do not use static allocate space but handle dynamically Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* worker: remove unused type field from AddBufInfoMarc-André Lureau2015-10-281-11/+1
| | | | | | | | value was always BUF_TYPE_RAW Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Uri Lublin <ulublin@redhat.com>
* worker: fix timer queue creationFrediano Ziglio2015-10-281-4/+4
| | | | | | | | | | | Timer queue is attached to current thread when created so it must be created from the proper thread. After worker initialization is moved in a following patch to main thread the queue was created in the wrong thread causing program to fail saying that the queue is NULL. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Uri Lublin <ulublin@redhat.com>
* server: group worker channel related stuffMarc-André Lureau2015-10-261-2/+5
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: remove need for WorkerInitDataMarc-André Lureau2015-10-265-121/+90
| | | | | | Move code around to declare and place it where it fits better. Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: access dispatcher pending field using helper functionsMarc-André Lureau2015-10-264-15/+31
| | | | | Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* server: split cache-item.hMarc-André Lureau2015-10-233-15/+41
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* server: start separate display/cursor channel headersMarc-André Lureau2015-10-235-262/+314
| | | | | | Just move some declarations around Acked-by: Frediano Ziglio <fziglio@redhat.com>
* server: remove worker->idMarc-André Lureau2015-10-231-5/+3
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* build-sys: Adjust to new spice-common spice-deps.m4Christophe Fergeau2015-10-231-2/+2
| | | | | | | | | | | | | | | | | | | | | This commit also updates the spice-common submodule Christophe Fergeau (7): Add marshaller test case build-sys: Use ${PKG_CONFIG} rather than pkg-config build-sys: Rework SPICE_CHECK_* m4 macros build-sys: Add gio-2.0 to SPICE_CHECK_GLIB2 build-sys: Fix error in SPICE_CHECK_LZ4 description build-sys: Set automake conditional in SPICE_CHECK_SMARTCARD build-sys: Rename SUPPORT_GL to HAVE_GL Javier Celaya (1): Fix linearization of several marshallers with one item Lukas Venhoda (3): ssl-verify: Only check addr length when using IP addr m4: Require glib version >= 2.22 ssl-verify: Changed IPv4 hostname to IPv6
* remove small leak in MJPEG codeFrediano Ziglio2015-10-231-0/+1
| | | | | | | | cinfo.dest is allocated in spice_jpeg_mem_dest but never freed. Note that jpeg_destroy_compress does not free this field as is supposed to be a buffer provided by jpeg caller. Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* reduce locking time in async_command_allocFrediano Ziglio2015-10-231-1/+2
| | | | Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* removed unused recv_core fieldFrediano Ziglio2015-10-231-1/+0
| | | | Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
* worker: remove useless MESSAGE_READYMarc-André Lureau2015-10-232-13/+7
| | | | | | | Now that worker is created before running, and run() returns success, there is no point in using MESSAGE_READY. Acked-by: Frediano Ziglio <fziglio@redhat.com>
* dispatcher: style updateMarc-André Lureau2015-10-231-1/+1
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* server: remove worker thread creation from dispatcherMarc-André Lureau2015-10-226-27/+50
| | | | | Acked-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* server/dispatcher: move worker enums to dispatcher headerMarc-André Lureau2015-10-222-94/+96
| | | | | | | Group enums with their respective struct location. Acked-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
* worker: use a single clockidMarc-André Lureau2015-10-211-28/+30
| | | | | The stat functions in worker are not generic enough to deserve to be "non-worker", so just pass the worker instance.
* server: rename red_client_cache.h to cache_item.tmpl.cMarc-André Lureau2015-10-203-3/+3
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* Add missing license headersChristophe Fergeau2015-10-1927-0/+460
|
* syntax-check: Remove unused #include <strings.h>Christophe Fergeau2015-10-191-1/+0
|
* syntax-check: Add missing #include <config.h>Christophe Fergeau2015-10-194-0/+14
|
* syntax-check: Don't use tabs for indentationChristophe Fergeau2015-10-194-12/+12
|
* worker: use GOnce to surround some global init in dispatcherMarc-André Lureau2015-10-192-3/+8
| | | | | Acked-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>