Commit Graph

1288 Commits

Author SHA1 Message Date
Alon Levy
67cbdccccf server/red_worker/red_process_commands: rename drawable to red_drawable (later add a local drawable)
(cherry picked from commit bab771c10d)

Conflicts:

	server/red_worker.c
    s/ASSERT/spice_assert/
2012-05-15 19:24:31 +03:00
Alon Levy
445364fe7d server/red_worker: red_process_drawable: have single point of exit
(cherry picked from commit c8cefd4a8f)
2012-05-15 19:24:29 +03:00
Yonit Halperin
6a9f2c9453 server/red_worker: don't release self_bitmap unless refcount is 0
RHBZ: 808936
(cherry picked from commit 6935bd3d60)
2012-05-15 19:24:26 +03:00
Jeremy White
d3bf13c9b4 Force 64 bit multiplication on 32 bit systems; fixes a bug where the server times out the display channel freakily fast.
(cherry picked from commit 8d3ebe31dd)
2012-05-15 19:24:22 +03:00
Yonit Halperin
ca5ed46192 server/mjpeg_encoder: fix wrong size assigned to dest_len
It should have been the allocated size and not the occupied one.
This led to a lot of unnecessary allocations and deallocations.
(cherry picked from commit c211774422)
2012-05-14 10:58:09 +03:00
Yonit Halperin
a3c4dc8f36 server/mjpeg_encoder: Fix memory leak for the inital output buffer given for each frame
(cherry picked from commit fecc1e3d4d)
2012-05-14 10:58:01 +03:00
Alon Levy
63e3456e12 server/reds: add "usbredir" to recognized channel names
RHBZ: 819484

Signed-off-by: Alon Levy <alevy@redhat.com>
(cherry picked from commit ce8e865cf1)
2012-05-14 10:57:57 +03:00
Alon Levy
3d04483148 server/red_memslots: don't assume 64 bit environment
assumption that unsigned long == QXLPHYSICAL causes get_virt to compute
the wrong slot. Fix by replacing addr variables to be of type
QXLPHYSICAL.
2012-04-24 16:53:17 +03:00
Alon Levy
f13ca12774 server/red_worker: fix for case where ASSERT is compiled out 2012-04-24 16:53:01 +03:00
Alon Levy
9ee43c37ce server/red_memslots: use QXLPHYSICAL for addresses
Cannot assume unsigned long == QXLPHYSICAL, not true for 32 bit
architectures.
2012-04-24 16:52:52 +03:00
Alon Levy
c90d42e2ac server/red_memslots: drop two unused functions
cb_get_virt and cb_validate_virt have disappeared a long time ago,
not needed since:

commit 5ac88aa79f
Author: Gerd Hoffmann <kraxel@redhat.com>
Date:   Thu Jul 1 17:55:33 2010 +0200

    Properly parse QXLImage to the new-world SpiceImage

    SpiceImage now replaces RedImage and has all image types in it.
    All image data are now chunked (and as such not copied when demarshalling).
2012-04-24 16:52:45 +03:00
Arnon Gilboa
9eb73318ce client/windows: fix SetClipboardViewer error handling rhbz#786554
MSDN says the following about SetClipboardViewer(): "If an error occurs or there
are no other windows in the clipboard viewer chain, the return value is NULL".
Seems like the buggy case was "no other windows in the clipboard viewer chain",
which explains the 3rd party clipboard manager workaround detailed in the bug
description.

It also seems like SetClipboardViewer() does not clear the error state on
succcess. Calling SetLastError(0) before SetClipboardViewer() seems to solves
this issue.

Since we could not reproduce the bug on our env, the customer has verified on
several of their systems that a private build resolved the issue.
2012-03-01 13:33:48 +02:00
Yonit Halperin
d82ac68c5a client X11: support volume keys when evdev is in use
Add support for sending volume keys scancodes to the guest
RHBZ #552539

Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
(cherry picked from commit d2cd7b2b02)
2012-03-01 09:26:43 +02:00
Yonit Halperin
4b468cd45c client: keyboard - add mapping for volume keys
Add support for sending volume keys scancodes to the guest
RHBZ #552539

A good reference for mapping keymaps to scancodes can be found in
spice-gtk/gtk/keymaps.csv

Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
(cherry picked from commit 68cdc5488d)
2012-03-01 09:26:41 +02:00
Christophe Fergeau
e342ef8357 Fix compilation when smartcard support is disabled
The addition of smartcard control to the controller doesn't handle
the case when smartcard support is disabled at compile time. When
this is the case, this causes compile errors.
(cherry picked from commit a50619e733)
2012-03-01 09:26:40 +02:00
Alon Levy
547d508126 controller_test: add README 2012-02-28 14:41:39 +02:00
Alon Levy
0c6c93df1c client controller_test: reorder parameters since pid isn't needed for linux client test 2012-02-28 14:41:35 +02:00
Alon Levy
7f1ed9283f client: handle CONTROLLER_ENABLE_SMARTCARD (rhbz 641828) 2012-02-28 14:41:33 +02:00
Alon Levy
8b0dcb5e0c controller_test: add ENABLE_SMARTCARD 2012-02-28 14:41:30 +02:00
Alon Levy
8943feccfc server, separate SpiceChannelEventInfo from RedStream
fixes rhbz 790749 use after free of SpiceChannelEventInfo.

The lifetime of the SpiceChannelEventInfo was that of RedsStream, but it
is used by main_dispatcher_handle_channel_event after the RedsStream is
freed for the cursor and display channels. Making SCEI allocation be at
RedsStream allocation, and deallocation after the DESTROY event is
processed by core->channel_event, fixes use after free.
2012-02-23 18:04:01 +02:00
Hans de Goede
83d000fdab server/spicevmc: Don't destroy the rcc twice
spicevmc calls red_channel_client_destroy() on the rcc when it disconnects
since we don't want to delay the destroy until the session gets closed as
spicevmc channels can be opened, closed and opened again during a single
session.

This causes red_channel_client_destroy() to get called twice, triggering
an assert, when a connected channel gets destroyed.

This was fixed with commit ffc4de01e6 for
the case where: a spicevmc channel was open on client disconnected, and
the main channel disconnect gets handled first.

But the channel can also be destroyed when the chardev gets unregistered
with the spice-server. This path still triggers the assert.

This patch fixes this by adding a destroying flag to the rcc struct, and
also moves the previous fix over to the same, more clean, method of
detecting this special case.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-02-20 16:37:22 +01:00
Yonit Halperin
da66d784e2 server: support IPV6 addresses in channel events sent to qemu
RHBZ #788444

CC: Gerd Hoffmann <kraxel@redhat.com>

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
(cherry picked from commit 5868c99da6)
2012-02-12 13:21:12 +02:00
Hans de Goede
2f4115e52e Merge remote-tracking branch 'origin/master' into 0.10 2012-01-23 16:21:14 +01:00
Hans de Goede
8817549795 Release 0.10.1 2012-01-23 15:58:13 +01:00
Hans de Goede
a0190fce23 Fix various comparison between signed and unsigned integer expressions warnings
These turn into errors because of our -Werror use, breaking the build.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-01-23 15:58:13 +01:00
Alon Levy
459a4dba56 server/red_channel: red_peer_handle_incoming: comment on null check
Signed-off-by: Alon Levy <alevy@redhat.com>
2012-01-23 12:58:30 +02:00
Alon Levy
51d7598a2e server/tests/test_empty_success: fix warning on bzero
Signed-off-by: Alon Levy <alevy@redhat.com>
2012-01-23 12:41:56 +02:00
Dan McGee
07b8d85cb6 Use found python binary to check for pyparsing
This matches what we do in client/Makefile.am to actually run the
python scripts, which is to use the python binary we find first,
preferring 'python2' over 'python'. This makes the compile work on odd
systems such as Arch Linux where the python binary is actually python3.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2012-01-23 12:28:59 +02:00
Dan McGee
90d6126869 Remove epoll headers from client code
There is no more usage of epoll on the client side, so no need to
include these header files.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2012-01-23 12:28:59 +02:00
Nahum Shalman
781706ea0d server: don't complain if setsockopt(SO_PRIORITY) call fails
dc7855967f did this for the TCP_NODELAY and IP_TOS calls; we should do
it for priority as well if necessary.

We also #ifdef the setting of the low-level socket priority based on
whether we have a definition of SO_PRIORITY available. This option is
not available on Illumos/Solaris platforms; however, since we set IP_TOS
anyway it is not a big deal to omit it here.
2012-01-23 12:28:58 +02:00
Dan McGee
89cc196a1b server/inputs_channel: don't set O_ASYNC option on socket
output to send a SIGIO signal to the running program. However, we don't
handle this signal anywhere in the code, so setting the option is
unnecessary.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2012-01-23 12:28:58 +02:00
Dan McGee
b0b19f4b25 Update .gitignore with a few more generated files
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2012-01-23 12:28:58 +02:00
Dan McGee
c4ddc5ba51 Fix git commit hook errors in red_worker
This ensures all line lengths are down below 100 characters as well as
removing some trailing spaces.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2012-01-23 12:28:57 +02:00
Dan McGee
046b88ec64 Fix line length errors in main_channel
These are all existing errors; fix them so they don't block future
commits in this file unnecessarily.

    error (1): length @ server/main_channel.c +369
    error (2): length @ server/main_channel.c +444
    error (3): length @ server/main_channel.c +764
    error (4): length @ server/main_channel.c +932
    error (5): length @ server/main_channel.c +1044

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
2012-01-23 12:28:57 +02:00
Alon Levy
6032a95205 docs/Spice_for_newbies.odt: some updates - added copy paste and wan mention, removed vdi_port 2012-01-22 15:13:32 +02:00
Alon Levy
88f68f5329 server/red_channel: avoid segfault if stream == NULL 2012-01-22 15:13:32 +02:00
Alon Levy
7dbdd93bf9 client/foreign_menu: arm build fix 2012-01-22 15:13:32 +02:00
Alon Levy
afd7dfde1f import existing odt docs 2012-01-22 15:13:31 +02:00
Hans de Goede
c05523462f Merge remote-tracking branch 'origin/master' into 0.10 2012-01-18 11:19:15 +01:00
Hans de Goede
35d35634a9 Merge commit 'a3a3b34a46f57ce86da444532e1db292638a74cd' into 0.10 2012-01-18 11:17:21 +01:00
Hans de Goede
dc7855967f server: Don't complain if setsockopt NODELAY fails on unix sockets
With Daniel P. Berrange's patches to allow use of pre-supplied fd's
as channels, we can no longer be sure that our connections are TCP
sockets, so it makes no sense to complain if a TCP/IP specific
setsockopt fails with an errno of ENOTSUP.

Note that this extends Daniel's commit 492ddb5d1d
which already added the same check to server/inputs_channel.c

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-01-18 11:14:40 +01:00
Daniel P. Berrange
b5060ff813 Add a 'syntax-check' make target
The 'make syntax-check' target is used to perform various code
style sanity checks, as well as to detect certain trivial error
patterns. The target is placed in GNUmakefile, instead of Makefile.am
since it relies on GNU specific make extensions.

The actual GNUmakefile and maint.mk files are taken from the
GNULIB project, unchanged

The cfg.mk file is used to configure which of the syntax checks
are activated, to allow addition of new project specific syntax
checks, and to blacklist certain files which should not be checked

* .mailmap: Add mapping for various broken email addrs in
  commit log, to stop complaints about AUTHORS file missing
  entries
* GNUmakefile: define the 'syntax-check' rule
* maint.mk: definition of standard syntax checks
* cfg.mk: configuration for checks
2012-01-13 18:12:00 +02:00
Daniel P. Berrange
68c2897e5b Remove trailing whitespace from end of lines 2012-01-13 18:11:59 +02:00
Daniel P. Berrange
51f1ad54ad Replace test XXX -a YYY with test XXX && test YYY
The '-a' and '-o' operators to test are not portable. Always
combine two invocations of 'test' using || or && instead.
2012-01-13 18:11:59 +02:00
Daniel P. Berrange
7427b23d84 Add missing includes of config.h
Not all files were including config.h
2012-01-13 18:11:59 +02:00
Daniel P. Berrange
d46bc77278 Remove bogus include of strings.h
The tests include strings.h but don't need any of its functions
2012-01-13 18:11:59 +02:00
Daniel P. Berrange
2d530f929f Remove unused backup file
The common/glc.c.save file appears to be a obsolete copy of
glc.c
2012-01-13 18:11:59 +02:00
Daniel P. Berrange
02d56750bd Remove trailing blank lines
Remove any blank lines at the end of all source files
2012-01-13 18:11:59 +02:00
Daniel P. Berrange
8ab7c4535a Remove 'the the' typos 2012-01-13 18:11:59 +02:00
Daniel P. Berrange
9f087ee7f0 Remove unused assert.h include
The assert.h include was never used in any code
2012-01-13 18:11:59 +02:00