summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-05-11docs: Convert VD_interfaces to asciidocmanualPavel Grunt2-1/+392
TODO!!!! (ended at 6. Base structure of VD interface.) Related: https://bugs.freedesktop.org/show_bug.cgi?id=95258
2016-05-11docs: Move manual to docs directoryPavel Grunt8-36/+21
Related: https://bugs.freedesktop.org/show_bug.cgi?id=95258
2016-05-11docs: Remove outdated Spice_user_manual.odtPavel Grunt1-0/+0
Replaced by the asciidoc version Related: https://bugs.freedesktop.org/show_bug.cgi?id=95258
2016-05-11style: remove documentation for C++Frediano Ziglio1-118/+2
C++ usage was removed with spicec (the old client). Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-05-11style: remove spice client sectionFrediano Ziglio1-19/+0
Spice client is no more in this repository and also the style was changed Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-05-10removed converted Spice_style.odtFrediano Ziglio1-0/+0
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-05-10converts Spice_style.odt to asciidoc spice_style.txtFrediano Ziglio2-0/+467
The conversion try keeps the content as is no matter if updated or not. Asciidoc format is already used for manual. Using a text format make easier to see git diff and send patches. Also it's easier to convert to different format and copy to web pages. Related: https://bugs.freedesktop.org/show_bug.cgi?id=95258 Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-05-10reset pointer to RedCharDeviceWriteBuffer calling ↵Frediano Ziglio5-26/+20
red_char_device_write_buffer_release This code make easier to be sure we don't have dangling pointers resetting in the function which free the structure. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-05-10build-sys: Remove 'CXX' from configure summaryChristophe Fergeau1-1/+0
We no longer make use of a c++ compiler since dropping the client, so no need to show it in the configure summary.
2016-05-10build-sys: Drop unneeded python checkChristophe Fergeau1-2/+0
spice-server does not use python, the spice-common submodule needs it, but it has its own python check through the use of AM_PATH_PYTHON
2016-05-10fix "spice--gtk" typo in configure.acFrediano Ziglio1-1/+1
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-05-09char-device: improved commentFrediano Ziglio1-1/+1
- fix typo; - simplify sentence. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-05-09Remove unused definitionsFrediano Ziglio1-6/+0
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-05-09remove sw-canvas.hFrediano Ziglio5-26/+4
This include was just including another file Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-05-09use #include<> style for spice-common header inclusions.Frediano Ziglio30-57/+57
The include directory is specified with the -I which is the directory used directly by #include<>. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-05-05remove dangling pointer for RedCharDeviceVDIPortFrediano Ziglio1-6/+4
When a client disconnects remove it from the list of clients connected to the spice char-device. This was caused by commit 1cec1c5118b65124de6bc6f984f376ff4e297bfb ("reds: Make VDIPortState a GObject") as the lifespan of RedCharDevice was changed. This could be reproduced with: - start rhel7 machine - connect remote viewer (RV) - RV: login - connect ssh - SSH: stop agent - disconnect RV - SSH: start agent - connect to RV and caused (using address sanitizer): main_channel_handle_parsed: agent start ================================================================= ==29592==ERROR: AddressSanitizer: heap-use-after-free on address 0x60c00001cff0 at pc 0x7fa85b6e8595 bp 0x7ffde3801940 sp 0x7ffde3801930 READ of size 8 at 0x60c00001cff0 thread T0 #0 0x7fa85b6e8594 in red_client_get_main /home/freddy/work/spice-server/server/red-channel.c:2190 #1 0x7fa85b7311e6 in vdi_port_send_msg_to_client /home/freddy/work/spice-server/server/reds.c:880 #2 0x7fa85b69383e in red_char_device_send_msg_to_client /home/freddy/work/spice-server/server/char-device.c:138 #3 0x7fa85b69383e in red_char_device_send_msg_to_clients /home/freddy/work/spice-server/server/char-device.c:356 #4 0x7fa85b69383e in red_char_device_read_from_device /home/freddy/work/spice-server/server/char-device.c:403 #5 0x55a2633b81c1 (/usr/bin/qemu-system-x86_64+0x5561c1) #6 0x55a2633afe7a (/usr/bin/qemu-system-x86_64+0x54de7a) #7 0x55a2634cb7b1 (/usr/bin/qemu-system-x86_64+0x6697b1) #8 0x55a2632078d0 (/usr/bin/qemu-system-x86_64+0x3a58d0) #9 0x55a26379b2e8 (/usr/bin/qemu-system-x86_64+0x9392e8) #10 0x55a26379a7a0 (/usr/bin/qemu-system-x86_64+0x9387a0) #11 0x55a26313fb78 in main (/usr/bin/qemu-system-x86_64+0x2ddb78) #12 0x7fa85a3cc57f in __libc_start_main (/lib64/libc.so.6+0x2057f) #13 0x55a26314b0c8 (/usr/bin/qemu-system-x86_64+0x2e90c8) 0x60c00001cff0 is located 48 bytes inside of 128-byte region [0x60c00001cfc0,0x60c00001d040) freed by thread T0 here: #0 0x7fa869e3667a in __interceptor_free (/lib64/libasan.so.2+0x9867a) #1 0x7fa85b6d75f7 in red_client_unref /home/freddy/work/spice-server/server/red-channel.c:2076 #2 0x7fa85b6ead74 in dispatcher_handle_single_read /home/freddy/work/spice-server/server/dispatcher.c:291 #3 0x7fa85b6ead74 in dispatcher_handle_recv_read /home/freddy/work/spice-server/server/dispatcher.c:314 #4 0x55a26379b2e8 (/usr/bin/qemu-system-x86_64+0x9392e8) #5 0x55a26379a7a0 (/usr/bin/qemu-system-x86_64+0x9387a0) #6 0x55a26313fb78 in main (/usr/bin/qemu-system-x86_64+0x2ddb78) #7 0x7fa85a3cc57f in __libc_start_main (/lib64/libc.so.6+0x2057f) previously allocated by thread T0 here: #0 0x7fa869e36b19 in __interceptor_calloc (/lib64/libasan.so.2+0x98b19) #1 0x7fa85b7d6858 in spice_malloc0 /home/freddy/work/spice-server/spice-common/common/mem.c:109 #2 0x7fa85b6e760c in red_client_new /home/freddy/work/spice-server/server/red-channel.c:2053 #3 0x7fa85b7449e4 in reds_handle_main_link /home/freddy/work/spice-server/server/reds.c:1762 #4 0x7fa85b7449e4 in reds_handle_link /home/freddy/work/spice-server/server/reds.c:2002 #5 0x7fa85b745d3a in reds_handle_ticket /home/freddy/work/spice-server/server/reds.c:2056 #6 0x55a26379b2e8 (/usr/bin/qemu-system-x86_64+0x9392e8) #7 0x55a26379a7a0 (/usr/bin/qemu-system-x86_64+0x9387a0) #8 0x55a26313fb78 in main (/usr/bin/qemu-system-x86_64+0x2ddb78) #9 0x7fa85a3cc57f in __libc_start_main (/lib64/libc.so.6+0x2057f) SUMMARY: AddressSanitizer: heap-use-after-free /home/freddy/work/spice-server/server/red-channel.c:2190 red_client_get_main Shadow bytes around the buggy address: 0x0c187fffb9a0: fd fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c187fffb9b0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c187fffb9c0: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd 0x0c187fffb9d0: fd fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c187fffb9e0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd =>0x0c187fffb9f0: fa fa fa fa fa fa fa fa fd fd fd fd fd fd[fd]fd 0x0c187fffba00: fd fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c187fffba10: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x0c187fffba20: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd 0x0c187fffba30: fd fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x0c187fffba40: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com> Acked-by: Uri Lublin <uril@redhat.com>
2016-05-04agent-msg-filter: Move include from headerPavel Grunt2-2/+1
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-05-04char-device: remove unused refs fieldFrediano Ziglio1-1/+0
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-05-04server: Enable adding alternative MJPEG video encodersFrancois Gouget9-186/+263
This replaces the original mjpeg_encoder API with a VideoEncoder base class which can be reimplemented by other encoders. This also renames the members and enums from mjpeg_* to video_*. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-05-04server: Correctly handle and trace stream report errorsFrancois Gouget1-1/+11
We may get stream reports after the stream has been closed, and even, in extreme cases, after a new stream has started reusing the same stream id. Neither case should cause the server to crash. So restore dcc_handle_stream_report() to how it was before being moved to dcc.c. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Victor Toso <victortoso@redhat.com>
2016-05-04Using already exists function instead of SPICE_CONTAINEROFSnir Sheriber1-10/+10
Using spicevmc_red_channel_client_get_state(rcc) (which already exists) instead of SPICE_CONTAINEROF(rcc->channel, SpiceVmcState, channel). Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-29Name MainChannelClient methods consistentlyJonathon Jongsma3-22/+28
Always use main_channel_client_ prefix instead of just main_channel_ in some cases.
2016-04-29Call public RedClient API instead of poking internalsJonathon Jongsma1-2/+2
Use red_client_during_migrate_at_target() instead of checking rcc->client->during_target_migrate.
2016-04-29Don't touch RedClient internals from RedChannelClientJonathon Jongsma1-5/+10
Change red_channel_client_set_migration_seamless() so that it returns a boolean which RedClient can use to update its internal count of num_migrated_channels rather than having RedChannelClient reaching into the internals of RedClient
2016-04-27audio: Remove global 'playback_compression' variableChristophe Fergeau3-6/+17
This variable belongs to SpiceServerConfig rather than being a static global variable hidden in sound.c Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-04-27Remove dead code in reds_fill_channels()Christophe Fergeau1-1/+0
channels_info->num_of_channels is assigned, its value is not used, and then it's assigned a different value. The first assignment can be removed. Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-04-27Improve Reds/RedMainChannel interfaceChristophe Fergeau3-12/+17
Instead of exporting 2 methods to get number of channels, and to fill channel information, and use that from the main channel code, it's better to do everything in one go in reds.c, and call that single method from the main channel code. Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-04-27Add _config_ to SpiceServerConfig accessorsChristophe Fergeau3-9/+9
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-04-27Mark unused public API methods/code as deprecatedChristophe Fergeau2-8/+10
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-04-27Add RedServerConfigChristophe Fergeau2-175/+187
This wraps/groups the various parameters that can be set by spice-server users through the spice_server_set_xxx public API. Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-04-27Rename all RedPipeItem subclassesJonathon Jongsma18-508/+529
Use 'Red' prefix to match internal type naming convention Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-27Rename PipeItem to RedPipeItemJonathon Jongsma22-268/+273
Following internal type naming conventions Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-27Use weak gobject ref instead of reds_on_char_device_state_destroyChristophe Fergeau3-10/+8
RedCharDevice implementation had to callback into reds.c in order to let it know a char device was being destroyed. Now that RedCharDevice is a gobject, a weak reference can be used instead allowing to remove that coupling. Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-04-27Use GQueue for RedCharDevice::send_queueChristophe Fergeau1-52/+20
There was an extra RedCharDeviceMsgToClientItem type whose only purpose was to manage a linked list of items to send. GQueue has the same purpose as this type in addition to being generic. As the length of the send queue is tracked, a GQueue is more appropriate than a GList and allow to remove RedCharDevice::send_queue_size. Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-27UpgradeItem: use base PipeItem for refcountingJonathon Jongsma4-21/+14
No need to re-implement refcounting in this subclass. Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-27Store display in Drawable structJonathon Jongsma3-18/+21
If the Drawable keeps a pointer to the Display channel that it is associated with, we can unref it directly and not need to pass the 'display' parameter separately to the unref function Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-26worker: remove check for canvas during cursor connectMarc-André Lureau3-13/+1
We want the cursor to be initialized even if there is no canvas, especially when using a GL scanout. This solves some client warnings when using qemu with GL scanout-only (patches under review on qemu ML). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-25Fix make distEduardo Lima (Etrunko)1-1/+0
spicec screenshot has been removed since commit b0186fe1267dfa2b8534c7c083dc301791279f08 Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2016-04-22manual: Remove spicec screenshotPavel Grunt2-4/+0
2016-04-22manual: No need to use sudo to run qemuPavel Grunt1-1/+1
2016-04-22manual: Recommend UsbDk instead of USB ClerkPavel Grunt1-2/+2
2016-04-22manual: Recommend enabling monitors using remote-viewer's menuPavel Grunt1-3/+2
2016-04-20Remove use of opaque from vdi_port_read_one_msg_from_deviceChristophe Fergeau1-2/+4
We can get 'reds' from the RedCharDevice accessible from the SpiceCharDeviceInstance passed as an argument. Acked-by: Pavel Grunt <pgrunt@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-20char device: use _reset_dev_instance() to set 'sin'Jonathon Jongsma1-4/+4
Internally, use the method to set the 'sin' member variable so that we don't have to duplicate the g_object_notify() calls, and there are consistent debug statements whenever this value is modified. This also means that we need to handle NULL arguments to this function. Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-20char device: use 'device' rather than 'state' for var namesJonathon Jongsma1-10/+10
Since the type name was changed, use variable names / debug statements that are consistent with the new name. Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-20char-device: notify when device instance is changedJonathon Jongsma1-0/+2
Since the device instance ("sin") is a gobject property, we should make sure to notify when it changes, particularly since we do some initialization in response to the "notify::sin" signal. Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-19sw-canvas: Get rid of unsused SW_CANVAS_IMAGE_CACHEHEADmasterPavel Grunt2-4/+0
See spice-common commit edac1b36b572cbd8988c44341185a9f51ea3eeb5 Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-04-15char-device: Remove RedCharDeviceClass::{un, }ref_msg_to_clientChristophe Fergeau5-69/+7
Now that client messages are always RedPipeItem, we don't need virtual functions to know how to ref/unref them.
2016-04-15char-device: Replace RedCharDeviceMsgToClient with PipeItemChristophe Fergeau5-41/+38
Now that all derived classes use a type deriving from PipeItem for their RedCharDeviceMsgToClient, we can make this explicit in the RedCharDeviceClass vfuncs, and remove the RedCharDeviceMsgToClient typedef.
2016-04-15dcc: Use refcounting for MonitorsConfigItemJonathon Jongsma1-15/+10