summaryrefslogtreecommitdiffstats
path: root/server
Commit message (Collapse)AuthorAgeFilesLines
...
* worker: move glz_drawable_count to DisplayChannelFrediano Ziglio2015-11-202-7/+8
| | | | | Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* worker: move display_channel_wait_for_migrate_dataMarc-André Lureau2015-11-193-31/+32
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: move dcc_start()Marc-André Lureau2015-11-194-223/+224
| | | | | Author: Marc-André Lureau <marcandre.lureau@gmail.com> Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: start a DisplayChannelClient unitMarc-André Lureau2015-11-199-238/+312
| | | | | | 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>
* worker: simplify GlzDrawableInstanceItem fields nameMarc-André Lureau2015-11-193-9/+9
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: move encoders to dcc-encodersMarc-André Lureau2015-11-196-591/+620
| | | | | | Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: painfully move display_channel_add_drawableMarc-André Lureau2015-11-184-546/+570
| | | | | Acked-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: add compression parameters to dccMarc-André Lureau2015-11-183-18/+31
| | | | | | | | | | | | | This allow different dcc to have different settings from default one. The parameters are copied initially from default settings but then they can change independently for each client. Even having a single client a future client is not affected by a previous setting on the old dcc. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> [updated for the preferred compression] Signed-off-by: Pavel Grunt <pgrunt@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
* Rename red_display_free_* to dcc_free_*Jonathon Jongsma2015-11-181-11/+11
| | | | Acked-by: Pavel Grunt <pgrunt@redhat.com>
* worker: simplify RedCompressBufMarc-André Lureau2015-11-182-89/+30
| | | | | | | | Make sure an allocated buffer is correctly referenced by the marshaller, and can't be free and reused by mistake. Simplify the code by using GSlice Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* worker: move surfaces to DisplayChannelMarc-André Lureau2015-11-183-617/+576
| | | | | | | | Ok. this one was painful.Note that in some cases, DCC_TO_DC should be made safer (there used to be a if !dcc guard in some places, although that looks wrong anyway)... Acked-by: Pavel Grunt <pgrunt@redhat.com>
* Move stream creation and maintenance functions to stream.[ch]Jonathon Jongsma2015-11-184-370/+378
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: move stream_agent_stop and friendsMarc-André Lureau2015-11-184-177/+180
| | | | Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* worker: Remove unused red_show_treePavel Grunt2015-11-181-18/+0
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* display-channel: Keep macro definition in one lineMarc-André Lureau2015-11-181-2/+2
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: simplify red_marshall_imageFrediano Ziglio2015-11-181-19/+15
| | | | | | | Remove some nested blocks using else if. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
* worker: Move stream functions to stream.cJonathon Jongsma2015-11-184-100/+104
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* Move some tree item functions to tree.[ch]Jonathon Jongsma2015-11-173-55/+61
| | | | | | | | | | | Also rename some functions slightly: __find_shadow -> tree_item_find_shadow() __contained_by -> tree_item_contained_by() ring_of -> tree_item_container_items(); Acked-by: Fabiano Fidêncio <fidencio@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* Move some more drawable functions to display channelJonathon Jongsma2015-11-162-28/+28
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: Rename current_clear() to current_remove_all()Jonathon Jongsma2015-11-161-8/+8
| | | | Acked-by: Pavel Grunt <pgrunt@redhat.com>
* Move dcc_push_stream_agent_clip() to display channelJonathon Jongsma2015-11-163-19/+20
| | | | | | rename to dcc_add_stream_agent_clip() Acked-by: Pavel Grunt <pgrunt@redhat.com>
* server: Duplicate typedef definitions are not allowed in C99Francois Gouget2015-11-163-4/+2
| | | | | | | This fixes some compilation errors with gcc 4.4.7 on RHEL 6. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* server: Include stdint.h for int64_tFrancois Gouget2015-11-161-0/+1
| | | | | | | This fixes a compilation error with gcc 4.4 on RHEL 6. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* server: Remove the display_channel_attach_stream() prototypeFrancois Gouget2015-11-131-3/+0
| | | | | | | It is unused. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: don't use weird RedCompressedBuf nbytes shiftingMarc-André Lureau2015-11-132-20/+30
| | | | | | | Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com> Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* spicevmc: set state of DeviceInstance to NULLVictor Toso2015-11-131-0/+1
| | | | | | | After spice_char_device_state_destroy is called spicevmc should not keep reference to that memory. state->chardev_st and sin->st point to the same SpiceCharDeviceState and both should be set to NULL when it is destroyed.
* char-device: set to NULL freed pointers on destroyVictor Toso2015-11-131-0/+2
| | | | | | | | As SpiceCharDeviceState is only unref'ed on spice_char_device_state_destroy the same device could be destroyed more then once so the pointers that are freed should be set to NULL. Related: https://bugzilla.redhat.com/show_bug.cgi?id=1281455
* reds: Do not abort due to wrong headerPavel Grunt2015-11-131-1/+4
| | | | | | | | | | | | | | | | | | | | | Just prevent the buggy client from connecting. #0 0x00007fffe83b2a98 in raise () at /lib64/libc.so.6 #1 0x00007fffe83b469a in abort () at /lib64/libc.so.6 #2 0x00007ffff7b1533d in spice_logv (log_domain=0x7ffff7b87226 "Spice", log_level=SPICE_LOG_LEVEL_ERROR, strloc=0x7ffff7b92aba "reds.c:1373", function=0x7ffff7b94f40 <__FUNCTION__.31775> "reds_send_link_ack", format=0x7ffff7b871fe "assertion `%s' failed", args=args@entry=0x7fffffffcb68) at log.c:109 #3 0x00007ffff7b15468 in spice_log (log_domain=log_domain@entry=0x7ffff7b87226 "Spice", log_level=log_level@entry=SPICE_LOG_LEVEL_ERROR, strloc=strloc@entry=0x7ffff7b92aba "reds.c:1373", function=function@entry=0x7ffff7b94f40 <__FUNCTION__.31775> "reds_send_link_ack", format=format@entry=0x7ffff7b871fe "assertion `%s' failed") at log.c:123 #4 0x00007ffff7aee335 in reds_handle_read_link_done (link=0x555556b27c70) at reds.c:1373 #5 0x00007ffff7aee335 in reds_handle_read_link_done (opaque=0x555556b27c70) at reds.c:2139 #6 0x000055555588acc6 in qemu_iohandler_poll () #7 0x000055555588a8e1 in main_loop_wait () #8 0x0000555555614064 in main () Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1281442 Acked-by: Fabiano Fidêncio <fidencio@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
* char-device: free all memory pool when no clientsVictor Toso2015-11-131-0/+6
| | | | | | | | When no client is connect we should not need to keep the memory pool used by char-device. In most situations this is not significant but when using webdav this could mean freeing MAX_POOL_SIZE bytes Related: https://bugs.freedesktop.org/show_bug.cgi?id=91350
* char-device: Define a memory pool limitVictor Toso2015-11-131-1/+8
| | | | | | | | Otherwise the amount of unused memory could grow while transfering big chunks of data. This change only means that once the memory was used it will not be stored again after the limit was reached. Related: https://bugs.freedesktop.org/show_bug.cgi?id=91350
* char-device: fix usage of free/unref on WriteBufferVictor Toso2015-11-131-12/+22
| | | | | | | | | | | There are places were the could should definetly free the SpiceCharDeviceWriteBuffer and places that it should only unref it. The current use of spice_char_device_write_buffer_free was missleading. This patch creates the spice_char_device_write_buffer_unref and properly call these two functions. Related: https://bugs.freedesktop.org/show_bug.cgi?id=91350
* worker: fix compiling with COMPRESS_STAT enabledFrediano Ziglio2015-11-123-22/+22
| | | | | | 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>
* worker: Remove usage of streaming_video global in DisplayChannelPavel Grunt2015-11-121-6/+6
| | | | | | | | | Avoid creating streams for every image due to not properly initialized DisplayChannel->stream_video field. Regression since: 4987df8e67f48cde13d39f4e81909f672ae33e29 Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: move some tree container functionsMarc-André Lureau2015-11-123-28/+33
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: rename a bit current_add functionsMarc-André Lureau2015-11-121-10/+10
| | | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: Remove duplicate DISPLAY_CLIENT_TIMEOUT defineJonathon Jongsma2015-11-111-1/+0
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: move RED_WORKER_STAT, make it compile againMarc-André Lureau2015-11-113-169/+154
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: Move drawable utility functions to display channelJonathon Jongsma2015-11-112-92/+92
| | | | | | | | Functions that check the equality of a path, brush, etc are moved the display channel source file to prepare for moving the surfaces to the display channel. Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: Move is_opaque_item() to tree.hJonathon Jongsma2015-11-112-6/+6
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: move drawable to displayMarc-André Lureau2015-11-112-68/+74
| | | | Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* worker: move current to displayMarc-André Lureau2015-11-102-12/+20
| | | | Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* worker: move red_destroy_surface_item()Marc-André Lureau2015-11-103-42/+49
| | | | Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* worker: move stream to display channelMarc-André Lureau2015-11-105-320/+323
| | | | Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* worker: move DisplayChannel/DisplayChannelClient functions togetherMarc-André Lureau2015-11-101-163/+164
| | | | | | 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 functions that handle DisplayChannelClientMarc-André Lureau2015-11-101-18/+18
| | | | | | | 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> Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: move stream functions to a new stream.c fileMarc-André Lureau2015-11-104-50/+78
| | | | | | | 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> Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: move stream definitions to a new stream.h fileMarc-André Lureau2015-11-104-93/+125
| | | | | | 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>
* worker: fix RED_STREAM_TIMOUT macro spellingMarc-André Lureau2015-11-101-3/+3
| | | | | Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* remove server/stream.h file added by mistake in previous commitFrediano Ziglio2015-11-101-139/+0
| | | | | Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
* worker: move image cache to displayMarc-André Lureau2015-11-105-91/+247
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>