summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* mingw: #ifdef unneeded #define in common.hChristophe Fergeau2012-03-041-0/+2
| | | | | | | | | common.h has some #define when doing win32 build to workaround a few missing functions on these systems. However, since mingw32 has some of these, this causes either warnings about redefining preprocessor symbols or wreak havoc in mingw headers trying to use these symbols. This commit wraps these symbols in an #ifndef __MINGW32__ to avoid using them on this platform.
* mingw: use uintptr_t when converting a pointer to an intChristophe Fergeau2012-03-044-7/+7
| | | | | | win64 uses 32 bit long, so we cannot use a long to hold a 64 bit pointer. Thankfully, there's a [u]intptr_t type available exactly for these uses.
* build-sys: fix make distcheckMarc-André Lureau2012-03-011-2/+2
| | | | | | | - Do not refer to .c files managed by another makefile (this will fail make distclean) - Do not refer to files by relative path (should use $top_srcdir for ex) - Use LDADD for object linking instead of LDFLAGS, for linker flags
* build-sys: cleanup server/tests/Makefile.amMarc-André Lureau2012-03-011-10/+43
|
* build-sys: use spice-protocol as submoduleMarc-André Lureau2012-03-015-1/+10
|
* build-sys: cleanup, use autoreconfMarc-André Lureau2012-03-012-158/+11
|
* client/windows: fix SetClipboardViewer error handling rhbz#786554Arnon Gilboa2012-03-011-3/+4
| | | | | | | | | | | | | | | 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.
* client X11: support volume keys when evdev is in useYonit Halperin2012-03-011-0/+6
| | | | | | | Add support for sending volume keys scancodes to the guest RHBZ #552539 Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
* client: keyboard - add mapping for volume keysYonit Halperin2012-03-012-0/+6
| | | | | | | | | | 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>
* Fix compilation when smartcard support is disabledChristophe Fergeau2012-02-294-0/+8
| | | | | | 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.
* controller_test: add READMEAlon Levy2012-02-281-0/+10
|
* client controller_test: reorder parameters since pid isn't needed for linux ↵Alon Levy2012-02-281-3/+3
| | | | client test
* client: handle CONTROLLER_ENABLE_SMARTCARD (rhbz 641828)Alon Levy2012-02-284-1/+11
|
* controller_test: add ENABLE_SMARTCARDAlon Levy2012-02-281-0/+4
|
* server: fix segfault on client disconnectAlon Levy2012-02-261-2/+1
| | | | | ..as a result of missing initialization of newly introduced pre_disconnect in main channel.
* Enabling cursor in server/testsFabiano Fidêncio2012-02-261-31/+48
| | | | | | Now, cursor is being shown in all tests as a white rectangle and is running in the screen doing a diagonal movement. It's a very simple way to test cursor commands and is sufficient for our tests.
* Use standard IOV_MAX definition where applicableDan McGee2012-02-214-9/+15
| | | | | | | | This is provided by <limits.h> on all platforms as long as _XOPEN_SOURCE is defined. On Linux, this is 1024, on Solaris, this is 16, and on any other platform, we now respect the value supported by the OS. Signed-off-by: Dan McGee <dpmcgee@gmail.com>
* Respect IOV_MAX if definedDan McGee2012-02-211-1/+26
| | | | | | | | | | | Solaris has a pitiful maximum writev vector size of only 16, so the ping request at initial startup destroyed this call and broke things immediately. Reimplement stream_writev_cb() to respect IOV_MAX and break the writev() calls into chunks as necessary. Care was taken to return the correct values as necessary so the EAGAIN handling logic can determine where to resume the writev call the next time around. Signed-off-by: Dan McGee <dpmcgee@gmail.com>
* red_worker: reimplement event loop using poll()Dan McGee2012-02-214-42/+69
| | | | | | | | | | | | | | | | | | This removes the epoll dependency we had in red_worker, which was the last Linux-specific call we were using in the entire Spice server. Given we never have more than 10 file descriptors involved, there is little performance gain had here by using epoll() over poll(). The biggest change is introduction of a new pre_disconnect callback; this is because poll, unlike epoll, cannot automatically remove file descriptors as they are closed from the pollfd set. This cannot be done in the existing on_disconnect callback; that is too late as the stream has already been closed and the file descriptor lost. The on_disconnect callback can not be moved before the close and other operations easily because of some behavior that relies on client_num being set to a certain value. Signed-off-by: Dan McGee <dpmcgee@gmail.com>
* Use memcpy call in red_channel_createDan McGee2012-02-211-8/+1
| | | | | | | | | Rather than assign the callbacks one-by-one, we can just memcpy the struct into the one we have allocated in our RedChannel object, which is much more efficient, not to mention future-proof when more callbacks are added. Signed-off-by: Dan McGee <dpmcgee@gmail.com>
* Cleanup definitions of disconnect methodsDan McGee2012-02-212-23/+5
| | | | | | | | | We had multiple stub methods that simply called other disconnect methods, making my head hurt with the indirection. Call the right methods at the right time and rip out the stub methods; if they are truely needed later they can be added again. Signed-off-by: Dan McGee <dpmcgee@gmail.com>
* red_worker: rename epoll_timeout to event_timeoutDan McGee2012-02-211-10/+11
| | | | | | | | | With future patches in mind that will allow for some other non-Linux-specific event polling sytem to be used, rename this to a more generic name. All of the select/poll/epoll/kqueue family of calls are related to evented I/O, so 'event_' makes sense in this case. Signed-off-by: Dan McGee <dpmcgee@gmail.com>
* Add configure-time check for -Wl, --version-script optionDan McGee2012-02-212-4/+18
| | | | | | | | | This is supported by the GNU linker, but not the Solaris linker, which is used as the default on that platform even when compiling with GCC. Omit passing the option to the linker on platforms that do not support it. Signed-off-by: Dan McGee <dpmcgee@gmail.com>
* server/spicevmc: Don't destroy the rcc twiceHans de Goede2012-02-203-3/+6
| | | | | | | | | | | | | | | | | | | | | | | 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 ffc4de01e6f9ea0676f17b10e45a137d7e15d6ac 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>
* server/tests/basic_event_loop: print something on channel_eventAlon Levy2012-02-151-1/+2
|
* server, separate SpiceChannelEventInfo from RedStreamAlon Levy2012-02-153-22/+30
| | | | | | | | | | 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.
* README: make a note of SPICE_DEBUG_ALLOW_MCAlon Levy2012-02-151-0/+5
|
* Remove all usages of bzero()Dan McGee2012-02-143-6/+6
| | | | | | As recommended by modern C practice, we should just be using memset(). Signed-off-by: Dan McGee <dpmcgee@gmail.com>
* Remove extra '\n' from red_printf() callsDan McGee2012-02-144-9/+9
| | | | | | | red_printf() takes care of adding a newline to all messages; remove the extra newline from all messages and macros that were doubling them up. Signed-off-by: Dan McGee <dpmcgee@gmail.com>
* server/tests: use getopt_longAlon Levy2012-02-143-22/+32
|
* Adding image to be used as "correct" in regression testsFabiano Fidêncio2012-02-141-0/+0
|
* Adding support to automated testsFabiano Fidêncio2012-02-148-10/+176
| | | | | | | As suggested by Alon, a simple automated test to try to find regressions in Spice code. To use this, compile Spice with --enable-automated-tests and run test_display_streaming passing --automated-tests as parameter.
* Add casts for compatibility purposesDan McGee2012-02-143-3/+3
| | | | | | | | | | | Some non-Linux platforms return a (caddr_t *) result for the return value of mmap(), which is very unfortunate. Add a (void *) cast to explicitly avoid the warning when compiling with -Werror. For the IO vector related stuff, signed vs. unsigned comes into play so adding a (void *) cast here is technically correct for all platforms. Signed-off-by: Dan McGee <dpmcgee@gmail.com>
* server: support IPV6 addresses in channel events sent to qemuYonit Halperin2012-02-122-4/+23
| | | | | | | | | RHBZ #788444 CC: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Yonit Halperin <yhalperi@redhat.com>
* Fix mandatory -Werror optionErlon Cruz2012-02-091-2/+1
| | | | | Compilation was breaking due to warning errors even when configuring with --enable-werror=no. This patch fix this.
* Handle Application::set_hotkeys failureChristophe Fergeau2012-02-032-17/+30
| | | | | | | | Application::set_hotkeys can throw an exception if it fails parsing the string describing the hotkeys to set. Currently this exception is uncaught which causes spicec to terminate when the controller tries to set invalid hotkeys. Fall back to using the default hotkeys when the controller sends an invalid hotkeys string.
* Don't use "hw:0,0" for recording with alsaChristophe Fergeau2012-01-311-1/+1
| | | | | | | | | We currently hardcode this device when spicec needs to record with alsa. However, this doesn't interact well with PulseAudio, which means that if something is already using the recording device, spicec won't be able to open it again. Using "default" as the device will let spicec use the PulseAudio alsa support and will avoid this issue.
* More comparison between signed and unsigned integer expressions warning fixesHans de Goede2012-01-232-3/+2
| | | | | | | | | | Turns out that more recent snapshots of gcc-4.7 emit even more of these, so the fixes which I've done before tagging the 0.10.1 release are not enough to build warning free with the latest gcc-4.7 snapshot <sigh>. This fixes this. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Release 0.10.1Hans de Goede2012-01-233-2/+10
|
* Fix various comparison between signed and unsigned integer expressions warningsHans de Goede2012-01-234-9/+9
| | | | | | These turn into errors because of our -Werror use, breaking the build. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* server/red_channel: red_peer_handle_incoming: comment on null checkAlon Levy2012-01-231-0/+2
| | | | Signed-off-by: Alon Levy <alevy@redhat.com>
* server/tests/test_empty_success: fix warning on bzeroAlon Levy2012-01-231-0/+2
| | | | Signed-off-by: Alon Levy <alevy@redhat.com>
* Use found python binary to check for pyparsingDan McGee2012-01-231-1/+2
| | | | | | | | | 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>
* Remove epoll headers from client codeDan McGee2012-01-232-2/+0
| | | | | | | 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>
* server: don't complain if setsockopt(SO_PRIORITY) call failsNahum Shalman2012-01-231-1/+7
| | | | | | | | | | dc7855967f4e 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.
* server/inputs_channel: don't set O_ASYNC option on socketDan McGee2012-01-231-7/+2
| | | | | | | | 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>
* Update .gitignore with a few more generated filesDan McGee2012-01-235-0/+7
| | | | Signed-off-by: Dan McGee <dpmcgee@gmail.com>
* Fix git commit hook errors in red_workerDan McGee2012-01-231-32/+56
| | | | | | | 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>
* Fix line length errors in main_channelDan McGee2012-01-231-11/+12
| | | | | | | | | | | | | 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>
* docs/Spice_for_newbies.odt: some updates - added copy paste and wan mention, ↵Alon Levy2012-01-221-0/+0
| | | | removed vdi_port