summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-07-12add spice-common submoduleHEADmasterChristophe Fergeau2-0/+3
2011-07-12adjust to common moving to a separate submoduleChristophe Fergeau8-94/+44
2011-07-08Fix spice-server/qemu channel version checksChristophe Fergeau1-8/+8
When qemu creates a channel, reds.c contains code to check the minor/major channel versions known to QEMU (ie the ones that were current in spice-server when QEMU was compiled) and to compare these versions against the current ones the currently installed spice-server version. According to kraxel [1], the rules for these interface numbers are: "The purpose of the versions is exactly to avoid the need for a new soname. The rules are basically: (1) You add stuff to the interface, strictly append-only to not break binary compatibility. (2) You bump the minor version of the interface. (3) You check the minor version at runtime to figure whenever the added fields contain valid stuff or not. An example is here (core interface, minor goes from 2 to 3, new channel_event callback): http://cgit.freedesktop.org/spice/spice/commit/?id=97f33fa86aa6edd25111b173dc0d9599ac29f879 " The code currently refuses to create a channel if QEMU minor version is less than the current spice-server version. This does not correspond to the intended behaviour, this patch changes to fail is qemu was compiled with a spice-server that is *newer* than the one currently installed. This case is something we cannot support nicely. [1] http://lists.freedesktop.org/archives/spice-devel/2011-July/004440.html
2011-07-06server: fix segfault if no migrate_info providedAlon Levy1-0/+11
qemu calls spice_server_migrate_switch even if it didn't do a spice_server_migrate_info first. Fix the resulting error by not pushing a switch host tag to the pipe in this case, and add a check anyway in the marshalling code just in case.
2011-07-05server: cursor_channel: releasing pipe items resources when the pipe is ↵Yonit Halperin1-9/+34
cleared (on disconnect) same as commit 74a9d10af96f4d7c8c1b1d7fca124a8df9180787 for cursor channel
2011-07-05server: display_channel: releasing pipe items resources when the pipe is ↵Yonit Halperin1-24/+75
cleared (on disconnect) fixes "display_channel_release_item: panic: invalid item type" Before changing the red_worker to use the red_channel interface, there was a devoted red_pipe_clear routine for the display channel and cursor channel. However, clearing the pipe in red_channel, uses the release_item callback the worker provided. This callback has handled only resources that need to be released after the pipe item was enqueued from the pipe, and only for pipe items that were set in red_channel_init_send_data. This fix changes the display channel release_item callback to handle all types of pipe items, and also handles differently pushed and non-pushed pipe items.
2011-07-05server: not reading command rings before RED_WORKER_MESSAGE_START, RHBZ #718713Yonit Halperin1-1/+11
On migration, destroy_surfaces is called from qxl (qxl_hard_reset), before the device was loaded (on destination). handle_dev_destroy_surfaces led to red_process_commands, which read the qxl command ring (which appeared to be not empty), and then when processing the command it accessed unmapped memory.
2011-07-05server: replace redundant code with red_cursor_resetYonit Halperin1-47/+24
In addition (1) make handle_dev_destroy_surfaces call red_release_cursor (2) call red_wait_outgoing_item(cursor_channel) only after adding msgs to pipe
2011-07-05server: removing local cursor, this solves RHBZ #714801Yonit Halperin1-114/+14
When the worker was stoped, the cursor was copied from guest ram to the host ram, and its corresponding qxl command was released. This is unecessary, since the qxl ram still exists (we keep references to the surfaces in the same manner). It also led to BSOD on guest upon migration: the device tracks cursor set commands and it stores a reference to the last one. Then, it replays it to the destination server when migrating to it. However, the command the qxl replayed has already been released from the pci by the original worker, upon STOP.
2011-07-05tests/migrate: update to use argparse and run spicy by defaultAlon Levy1-32/+56
Most helpful change is that it prints help if you do --help. It can take --image parameter, and --client parameter, defaults to spicy. Incidentally, spicy switch host seems broken - if you run with --client spicec (assuming spicec is in the PATH), it works fine, but using the default spicy (or --client spicy) it fails after a single switch.
2011-07-05server/tests/basic_event_loop: strange assert failure; fixAlon Levy1-1/+1
2011-07-05server/smartcard: register channel only when hardware is availableAlon Levy2-6/+9
2011-06-29Revert "server/smartcard: don't register the channel if no hardware emulated"Alon Levy1-4/+1
This reverts commit 456ff9f8d5d27ac763e89e67a100661084695dc5. That patch just disabled the smartcard channel completely because the check was done *before* the initialization of the qemu smartcard devices, not after.
2011-06-28red_worker: remove 2 empty functionsChristophe Fergeau1-12/+0
red_worker was using some share/unshare stream_buf functions whose body is empty. This commit removes them and their use.
2011-06-23server/smartcard: don't register the channel if no hardware emulatedAlon Levy1-1/+4
2011-06-23server/smartcard: handle BaseChannel messagesAlon Levy1-0/+6
According to spice.proto the smartcard channel can receive acks and any other message defined in BaseChannel. While the spicec implementation didn't send an ACK spice-gtk does, so handle it.
2011-06-22don't #include config.h in generated header filesChristophe Fergeau0-0/+0
7e30572ab adds a #include <config.h> to the beginning of generated files. It also does this for generated headers and enums files, which is not wanted, especially if it's an installed file. This commit only adds this include for the non-header non-enum case (hopefully, enums are only generated for use in a .h file).
2011-06-22s/__visible__/SPICE_GNUC_VISIBLEChristophe Fergeau4-59/+59
The C specification reserves use of identifiers starting with __ to the compiler so we shouldn't use one such symbol.
2011-06-22add check for pyparsingChristophe Fergeau1-0/+10
Check both in configure.ac (after checking if we need to rebuild the marshalling files) and in the python script using pyparsing (for people modifying .proto files in tarballs)
2011-06-22sndworker: check the caps before sending volume messagesMarc-André Lureau1-10/+46
2011-06-22sndworker: add AudioVolume/AudioMute messagesMarc-André Lureau3-4/+180
These messages allow the guest to send the audio device volume to the client. It uses an arbitrary scale of 16bits, which works good enough for now. Save VolumeState in {Playback,Record}State, so that we can send the current volume on channel connection. Note about future improvements: - add exact dB support - add client to guest volume change Updated since v2: - bumped record and playback interface minor version to allow conditional compilation Updated since v1: - sync record volume on connection too
2011-06-21python: remove c-ism trailing ;Marc-André Lureau0-0/+0
2011-06-21codegen: typedef the protocol enumsMarc-André Lureau0-0/+0
Commit 9d5ef9beeca722b2ceff7d15aaa3aaaaf07ecfbf in spice-protocol introduced a typedef manually in the generated enums.h header. This patch adds them automatically to all enums during enums.h generation.
2011-06-14client: fix for redundant shift+f11 RHBZ #674532Yonit Halperin3-10/+27
After shift+F11, both in Windows 7 and xp clients, WM_KEYUP events were missing for SHIFT and F11. For F11 it was less important since unpress_all was preformed for all keys. However, we perform sync for all the keyboard modifiers and the GetKeyboardState returns "down" for shift. In windows7 client, we sometimes received afterwards a F11 KEYDOWN event repetition, and this caused SHIFT+F11 to be called again. Not performing hiding of the windows while changing client resolutions, solved the problem of missing events, and I don't see any difference in how spice looks while toggling to full screen. Using GetAsyncKeyState, returns "UP" for shift in windows 7, and helps avoid performing shift+f11 again, if there is an F11 repetition before we receive the KEYUP event for shift.
2011-05-30client/windows: enable image randomization (ASLR) rhbz#701111Arnon Gilboa1-2/+2
Enable image randomized base address, hindering some types of security attacks by making it more difficult for an attacker to predict target addresses.
2011-05-30client/windows: remove slash from x64 build dirArnon Gilboa1-4/+4
otherwise x64 is built in root if REDC_BUILD_DIR is not defined
2011-05-24server/smartcard: fix use after freeAlon Levy1-1/+1
2011-05-22client/windows: remove precompiled header for common.h (fix broken windows ↵Arnon Gilboa1-4/+4
debug build) -Release currently doesn't use precompiled headers at all -Debug is broken since common/*.c files don't include common.h -PCH can be enabled for all but specifically-chosen c-files
2011-05-22common: add WIN64 ifdef for spice_bit_find_msb (fix broken windows x64 build)Arnon Gilboa0-0/+0
inline __asm is not supported in x64, so use the naive implementation until x64 asm implemented.
2011-05-19client: fix flipped video in Linux guest on windows client, RHBZ #667689Yonit Halperin1-3/+5
Video streams from Linux guests are oriented top-down, where gdi_canvas_put_image always received display context for down-top oriented bitmap. I fixed create_bitmap to consider the stream orientation.
2011-05-12common: use INLINE instead of inlineArnon Gilboa0-0/+0
needed for spice/common files used by the client, server & qxl driver. in windows _inline works for both c/c++, while inline is c++ only. compiling the client with mixed c/c++ code required this define.
2011-05-12client/windows: undef SIZE_MAX in stdint.hArnon Gilboa1-1/+1
eliminating redefinition warning
2011-05-12common: fix ssl_verify windows build errorsArnon Gilboa0-0/+0
2011-05-12client/windows: add common\ssl_verify.c/h to projectArnon Gilboa1-2/+10
disable WarnAsError, due to c/c++ warnings
2011-05-12client/windows: inc version to 0,9,0,0Arnon Gilboa1-4/+4
2011-05-12client/windows: init PACKAGE_VERSIONArnon Gilboa2-3/+5
in windows, we set PACKAGE_VERSION to the binary version since we don't have config.h as generated by linux configure
2011-05-12client: fix return code when missing hostAlon Levy1-0/+1
2011-05-09server/red_worker: stat_now cleanupAlon Levy1-1/+2
static, remove inline, add (void), and empty line after function variables.
2011-05-09server/red_worker: fix typo (lats_send_time)Alon Levy1-4/+4
2011-05-09server/tests: show port to connect toAlon Levy1-1/+3
2011-05-08server: bump SPICE_SERVER_VERSION to 0.9.0Marc-André Lureau1-1/+1
SASL functions will be released with 0.9.0
2011-05-05server: Unset executable bit of red_tunnel_worker.hZeeshan Ali (Khattak)1-0/+0
2011-05-03build: fix gettimeofday warningMarc-André Lureau1-0/+1
CC test_playback.o test_playback.c: In function ‘playback_timer_cb’: test_playback.c:56:5: warning: implicit declaration of function ‘gettimeofday’
2011-05-03client: make use of ssl_verify.cMarc-André Lureau4-385/+36
Fixed since v1: - don't include C code, rather use the common lib - add missing spice_openssl_verify_free() call - keep the extra-parsing of subject for error reporting
2011-05-03common: add ssl_verify.c common codeMarc-André Lureau0-0/+0
Code adapter from RedPeer::ssl_verify_callback() and used by spice-gtk. Since v1: - fixed Makefile.am - added config.h include - autoconf alloca added in patch series - moved int escape inside for loop - added a failed case when missing assignment - replaced strlen () by -1 - skip spaces after comma - c++ guards I didn't use bool, because openSSL uses int, and it is more future proof for error reporting.
2011-05-03common: add ring_get_length() for debugging purposesMarc-André Lureau0-0/+0
Please notice it has a "static" modifier, like the rest of the inlined functions in ring.h, so it won't warn if it isn't used.
2011-05-03common: mem.h add alloca definitionMarc-André Lureau1-0/+1
We don't support the autoconf ALLOCA/C_ALLOC fallback. If one day, someone cares for a weird platform, he can fix it.
2011-05-03common: spice_memdup could accept NULLMarc-André Lureau0-0/+0
(this patch is not to solve a crash fix, but to align with glib API)
2011-05-03common: add windows.h where required, make gdi_handlers staticMarc-André Lureau1-1/+0
This patch has not been verified with VS/brew. It should be safe hopefully. Compilation is fine with mingw32/spice-gtk.
2011-05-03build: require c99Marc-André Lureau2-1/+4
Because we use c99: stdbool.h, inttypes.h, bool, variadic macros, // comments, ...