Commit Graph

785 Commits

Author SHA1 Message Date
Zeeshan Ali (Khattak)
51bc547921 server: Unset executable bit of red_tunnel_worker.h 2011-07-21 15:09:28 +03:00
Marc-André Lureau
bc9d045760 common: spice_memdup could accept NULL
(this patch is not to solve a crash fix, but to align with glib API)
2011-07-21 15:09:28 +03:00
Christophe Fergeau
551ad336c1 add missing "LGPLv2.1 or later" header to source files 2011-07-21 15:09:28 +03:00
Christophe Fergeau
6bd492fa79 common: add extern "C" guards to headers
Since some spice C++ code is using code from common/, the C
functions need to be marked as such for the C++ compiler, otherwise
we'll get linkage issues.
2011-07-21 15:09:27 +03:00
Christophe Fergeau
3dab7bda53 configure.ac: replace tab with spaces
This makes the "C++ Compiler:     ...." status output nicely
aligned with the other messages.
2011-07-21 15:09:27 +03:00
Christophe Fergeau
0244f9a4b4 configure.ac: remove unused dynamic linkage flag
configure.ac defines a SPICEC_STATIC_LINKAGE_BDYNAMIC variable
when --enable-static-linkage is not set, but it's never used.
SPICEC_STATIC_LINKAGE_BSTATIC is used in client/, but since we
are using libtool, it might be more appropriate to use
'make LDFLAGS="-all-static"' to achieve static link.
2011-07-21 15:09:27 +03:00
Christophe Fergeau
2f8c25d986 configure.ac: fix use of AC_ARG_ENABLE
Most uses of AC_ARG_ENABLE were buggy:
- when passing --disable-xxx, configure.ac would behave as if it
  was passed --enable-xxx
- passing --enable-xxx=foo would "leak" into the summary, ie the
  summary (at the end of configure) would say "xxx: foo" instead
  of "xxx: yes"

This patch fixes these 2 issues.
2011-07-21 15:09:27 +03:00
Alon Levy
03004a57d5 spice.proto: Fill.rop_descriptor type s/uint16/ropd (10x atiti) 2011-07-21 15:09:27 +03:00
Christophe Fergeau
2bd98219f3 client: s/reqired/required in CmdLineParser 2011-07-21 15:09:27 +03:00
Christophe Fergeau
fdfc940f59 server/tests remove useless assignment
This was detected by clang-static-analyzer.
2011-07-21 15:09:27 +03:00
Christophe Fergeau
e77fc7e877 common/pixman: remove dead assignments
They were detected using clang-static-analyzer. Don't initialize
the variable to a value to override it with a different value
a few lines after.
2011-07-21 15:09:27 +03:00
Christophe Fergeau
96555db49a gl: remove unused variables
gcc 4.6 warned about these.
2011-07-21 15:09:27 +03:00
Christophe Fergeau
dda8e3f62c gl: use correct pixman accessor for image data
Commit 774e5bd36f changed
-  dest->source.pixmap.x_image->data +
+  (uint8_t *)pixman_image_get_stride(dest->source.pixmap.pixman_image) +

The correct accessor to use is pixman_image_get_data. Thanks to gcc
4.6 for warning about a "different size" int to pointer conversion.
2011-07-21 15:09:27 +03:00
Christophe Fergeau
416009c0c1 client: use silent generation rules in Makefile.am
The server Makefile.am rules for marshallers generation are
prefixed with AM_V_SILENT to integrate nicely with automake silent
rules. The same AM_V_SILENT prefix isn't used in client/Makefile.am
resulting in verbose output even when automake silent mode is
enabled. This commit removes this verbosity.
2011-07-21 15:09:27 +03:00
Christophe Fergeau
4ef1b8c331 common/gl: remove unused variable
clang static analyzer warned that 'len' was computed but never
used in glc_vertex2d. glc_stroke_line_dash has side effects so
we have to call it, but we don't need to save its return value
since it's not used.
2011-07-21 15:09:27 +03:00
Christophe Fergeau
c6b4cb0564 opengl: fix compilation
When OpenGL is enabled, build fails in DisplayChannel::create_surface
because Canvas *canvas is declared twice. Remove the first
declaration to fix compilation.
2011-07-21 15:09:27 +03:00
Alon Levy
f2bb4cfe62 python_modules/codegen.py: fix indent error in an unused function 2011-07-21 15:09:27 +03:00
Marc-André Lureau
f42e261aa6 server: add SASL support
We introduce 2 public functions to integrate with the library user.

spice_server_set_sasl() - turn on SASL
spice_server_set_sasl_appname() - specify the name of the app (It is
used for where to find the default configuration file)

The patch for QEMU is on its way.

https://bugs.freedesktop.org/show_bug.cgi?id=34795

Conflicts:

	server/reds.c
	server/reds.h
2011-07-21 15:09:27 +03:00
Marc-André Lureau
6101cb805a server: add auth mechanism selection
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:27 +03:00
Marc-André Lureau
bb6747b3d5 server: add reds_channel_dispose()
Try to have a common base dispose() method for channels. For now, it
just free the caps.

Make use of it in snd_worker, and in sync_write() - sync_write() is
going to have default caps later on.

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:26 +03:00
Marc-André Lureau
159fee00c2 server: simplify and constify sync_write()
+ symplify, improving style of code using it.

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:26 +03:00
Marc-André Lureau
8186db28c2 server: pull out reds_handle_link(), for future reuse
+ a couple of indent, style change

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:26 +03:00
Marc-André Lureau
b1df04b9c5 build: add --with-sasl
Using cyrus SASL library (same as gtk-vnc/qemu).

https://bugs.freedesktop.org/show_bug.cgi?id=34795

Conflicts:

	configure.ac
2011-07-21 15:09:26 +03:00
Marc-André Lureau
6a0ea67113 common: add SpiceBuffer - based on qemu-vnc Buffer
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:26 +03:00
Marc-André Lureau
a3732afda3 server/reds: make writev fallback more generic
We are going to reuse it for SASL/SSF encode write().

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:26 +03:00
Marc-André Lureau
26ded5e395 server: rename s/peer/stream
This is stylish change again. We are talking about a RedStream object,
so let's just name the variable "stream" everywhere, to avoid
confusion with a non existent RedPeer object.

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:26 +03:00
Marc-André Lureau
5f27f8f522 server/reds: remove the void* ctx field
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:26 +03:00
Marc-André Lureau
36ab16d6c5 server: use the new reds_stream_{read,write}
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:26 +03:00
Marc-André Lureau
584cc5a3d1 server: remove cb_free, not needed anymore
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:26 +03:00
Marc-André Lureau
a5946a54dd server: use reds_{link,stream}_free()
Be carefull removing the watch before, like __release_link

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:26 +03:00
Marc-André Lureau
6d8cbc2349 server: use reds_stream_remove_watch() helper
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:26 +03:00
Marc-André Lureau
eeb95c5b84 server: add reds_stream_{read,write,free,remove_watch}()
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:25 +03:00
Marc-André Lureau
881971fbca server: s/RedsStreamContext/RedsStream
https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:25 +03:00
Marc-André Lureau
a1ef838d34 server/reds: remove unused readv
Let's not bother with it since nobody uses it, and it's not implemented for SSL anyway

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:25 +03:00
Marc-André Lureau
e1cfe664c4 build: make it silent
This patch make it easier to spot warnings in compilation.  It should
work with older versions of automake that don't support silent rules.

If you want verbose build, make V=1.

Signed-off-by: Uri Lublin <uril@redhat.com>

https://bugs.freedesktop.org/show_bug.cgi?id=34795
2011-07-21 15:09:25 +03:00
Arnon Gilboa
4bdacb2c14 client/windows: use SPICE_PROTOCOL_DIR in project include dirs
instead of ..\..\..\spice-protocol. Relative path to another git tree is a bit
ugly, since it requires spice-protocol to be in a specific location.

SPICE_PROTOCOL_DIR should also be used in windows qxl and vdagent instead of
SPICE_COMMON_DIR, which is an old and confusing name, due to the common
directory in spice git repo.
2011-07-21 15:09:25 +03:00
Alon Levy
fcd4a8e446 server/red_channel: fix segfault on red_channel_destroy if peer already removed 2011-07-21 15:09:25 +03:00
Thomas Tyminski
b6445d35f7 Fixes compilation error of Spice Client (Linux/X11) with OpenGL enabled modified: client/x11/red_window.cpp 2011-07-21 15:08:32 +03:00
Gerd Hoffmann
8c0f2787ab build: s/HUGE/INFINITY/
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-21 15:08:32 +03:00
Gerd Hoffmann
205193f255 build: only check for x11 extensions when
building for x11 platform.
2011-07-21 15:08:32 +03:00
Gerd Hoffmann
4492f4854e build: alsa is needed on linux only.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-21 15:08:32 +03:00
Alon Levy
58f79a98b6 server/tests: Makefile.am: use AM_LDFLAGS instead of LDFLAGS 2011-07-21 15:08:32 +03:00
Alon Levy
ae7659fea9 server/red_channel: error channel if alloc_msg_buf fails (returns NULL) 2011-07-21 15:08:32 +03:00
Hans de Goede
ce516b0bdf spicec: Make loglevel configurable through the environment
Having a loglevel variable is much more useful if we can actually change
its value without a recompile. Use a SPICEC_LOG_LEVEL environment variable so
we can do this from the spice xpi / activex too (by setting the environment
variable before starting the browser).
2011-07-20 13:43:17 +02:00
Gerd Hoffmann
89accad2bf server: add symbol versioning to the spice server shared library.
This patch adds symbol versions to the spice server library.  Each
symbol which is exported by libspice-server gets tagged with the
(stable) version where it appeared first.  This way the linker and rpm
are able to figure which version of the spice-server libary is required
by a particular qemu binary/package.

[ 0.8 branch: drop 0.10 symbols from list ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-07-19 14:41:10 +02:00
Yonit Halperin
4f0e0ac712 client: fix for redundant shift+f11 RHBZ #674532
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-06-14 10:08:32 +03:00
Alon Levy
529dc40dc3 server/smartcard: fix use after free 2011-05-24 16:11:26 +03:00
Arnon Gilboa
31358b640b client/windows: init PACKAGE_VERSION
in windows, we set PACKAGE_VERSION to the binary version
since we don't have config.h as generated by linux configure
2011-05-24 12:29:13 +03:00
Yonit Halperin
04595c74ad client: fix flipped video in Linux guest on windows client, RHBZ #667689
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-19 14:07:57 +03:00
Alon Levy
f73a05021c client: fix return code when missing host 2011-05-12 12:56:04 +03:00