summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-04-26Disable -Waggregate-return if building with SLIRPDaniel P. Berrange1-1/+4
The API design of SLIRP means that it is not practical to use the -Waggregate-return warning flag. Disable this flag in the (unlikely) scenario where SLIRP is actually requested at build time
2012-04-26bump spice-common with SpiceClips fixAlon Levy1-0/+0
2012-04-25Add some more 'noreturn' annotationsDaniel P. Berrange6-9/+9
Methods which longjump, unconditionally raise an exception, or call _exit() cannot return control to the caller so should be annotated with 'noreturn' Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Fix typo in is_equal_brushDaniel P. Berrange1-1/+1
The 3 part of the conditional in the is_equal_brush method compared the b1->u.color field to itself, instead of b2->u.color Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Fix printf format specifiers for i686 hostsDaniel P. Berrange3-5/+5
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Add missing struct field initializersDaniel P. Berrange1-5/+5
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Ensure config.h is the first include in the fileDaniel P. Berrange1-1/+1
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Add a few more syntax-check exemptionsDaniel P. Berrange1-2/+4
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Add recent new committers to AUTHORS file / mailmapDaniel P. Berrange2-0/+7
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Enable many more compiler warningsDaniel P. Berrange5-77/+385
* m4/manywarnings.m4m, m4/warnings.m4: Import GNULIB warnings modules * m4/spice-compile-warnings.m4: Define SPICE_COMPILE_WARNINGS * configure.ac: Replace compile warning check with a call to SPICE_COMPILE_WARNINGS * client/Makefile.am: Use WARN_CXXFLAGS instead of WARN_CFLAGS Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Make some int->pointer casts explicitDaniel P. Berrange1-2/+2
Tell the compiler that was really do intend to cast from int to pointer, to prevent warnings about implicit casts * server/tests/test_display_base.c: Add explicit casts Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Fix broken -I../common to be -I../spice-common in clientDaniel P. Berrange1-1/+1
* Makefile.am: s/common/spice-common/ Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25VSCMsgHeader.reader_id is unsigned, so don't check for >= 0Daniel P. Berrange1-2/+1
* server/smartcard.c: Fix assertion to not check for >= 0 on unsigned variable Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Avoid jumping across variables declarations with initializersDaniel P. Berrange1-1/+2
If a 'goto' statement jumps across a variable declaration which also has an initializer, the variable is in an undefined state. Splitting the the declaration & initialization doesn't change that, but the compiler can at least now detect use of the unintialized variable Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Convert cases of () to (void)Daniel P. Berrange2-5/+5
* server/reds.c, server/smartcard.c: s/()/(void) Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Remove 2 *MB* stack frame in red_worker_mainDaniel P. Berrange1-25/+25
The red_worker_main method allocates a RedWorker struct instance on the stack. This struct is a full 2 MB in size which is not at all resonable to allocate on the stack. * server/red_worker.c: Move RedWorker struct to the heap Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Mark some variables as volatileDaniel P. Berrange1-3/+3
When using setjmp/longjmp the state of local variables can be undefined in certain scenarios: [quote man(longjmp)] The values of automatic variables are unspecified after a call to longjmp() if they meet all the following criteria: · they are local to the function that made the correspond‐ ing setjmp(3) call; · their values are changed between the calls to setjmp(3) and longjmp(); and · they are not declared as volatile. [/quote] * server/red_worker.c: Mark some vars as volatile Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Mark functions which never return controlDaniel P. Berrange2-4/+3
* client/red_channel.cpp: AbortTrigger::on_event can't return given its current impl * server/red_worker.c: red_worker_main can't return Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Fix multiple printf format problemsDaniel P. Berrange9-18/+16
All printf var-args style methods should be annotation with their format. All format strings must be const strings. * client/application.cpp, client/cmd_line_parser.cpp, client/hot_keys.cpp: Avoid non-const format * client/client_net_socket.cpp: Fix broken format specifier * client/red_peer.cpp: Fix missing format specifier * client/platform.h: Add SPICE_GNUC_PRINTF annotation to term_printf * client/utils.h: Add SPICE_GNUC_PRINTF annotation to string_printf * server/glz_encoder_config.h, server/red_worker.c: Add SPICE_GNUC_PRINTF annotation to warning callbacks Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Fix const-ness violationsDaniel P. Berrange2-3/+3
* server/red_worker.c: Add missing const for return type * server/reds.c: Static strings must be declared const Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-25Don't do arithmetic on void * type, use uint8_t insteadDaniel P. Berrange1-6/+6
Arithmetic on void * types is non-portable & trivially avoided * server/dispatcher.c: Use uint8_t for arithmetic Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-04-18spice-common: update submodule to verify_subject MSVC++ fixAlon Levy1-0/+0
2012-04-18spice-common: update submoduleAlon Levy1-0/+0
2012-04-18update spice-common for MSVC++ build fixesAlon Levy1-0/+0
2012-04-18update visual studio project fileAric Stewart1-36/+36
Note, there may be line-ending issues here is we are not careful. This file is a msdos formatted file. There was some inconsistencies in those line-ending that I have normalized. Signed-off-by: Aric Stewart <aric@codeweavers.com>
2012-04-18client/windows/redc.vcproj: switch to unix EOL (dos2unix)Alon Levy1-1001/+1001
2012-04-18Update win32 generate(1).bat files to match modern usageAric Stewart2-4/+4
This involves: generating .c instead of .cpp files Not including "common.h" Standardizing some parameters Signed-off-by: Aric Stewart <aric@codeweavers.com>
2012-04-18we do not need afxres.h included in redc.rcAric Stewart1-1/+1
It is not an MFC project so simply including windef.h is better and allows for compiling with the Express editions of Visual Studio.
2012-04-18fix error-path return in snd_set_record_peer()Michael Tokarev1-2/+2
The error_{1,2} labels in this functions are backwards. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2012-04-17Copy getopt.h from old common/win/my_getopt-1.5/my_getoptAric Stewart1-0/+56
This patch completes the copy from 4d8f39020ac83602c1647d4af04e8b19bf74ed6e which missed this file.
2012-04-17update windows client generate.bat and generate1.batAric Stewart2-4/+4
the python script is now in spice-common and client_marshallers.h needs to be included instead of marshallers.h
2012-04-05server: allow failure in getvirtAlon Levy5-89/+240
This patch changed getvirt to continue working even if spice_critical doesn't abort (i.e. SPICE_ABORT_LEVEL != -1). This is in preparation to make getvirt not abort at all. The reason is that getvirt is run on guest provided memory, so a bad driver can crash the vm.
2012-04-02Replace sprintf with snprintf useChristophe Fergeau1-1/+1
The hotkey parser was generating a string with sprintf and data it got from the controller socket (ie data which can have an arbitrary length). Using sprintf there is a bad idea, replace it with snprintf.
2012-03-28spice-common: update to fix quic-encode warningsMarc-André Lureau1-0/+0
2012-03-26server: export spice_server_is_server_mouse predicateAlon Levy3-1/+13
To be used by qemu query-spice / info spice commands.
2012-03-26Remove files moved to spice-commonMarc-André Lureau10-5504/+0
2012-03-25Copy common/win/my_getopt-1.5/my_getopt client/windowsMarc-André Lureau2-21/+352
2012-03-25Use the spice-common logging functionsMarc-André Lureau21-908/+907
It will abort by default for critical level messages. That behaviour can be tuned at runtime.
2012-03-25Use the spice-common submoduleMarc-André Lureau126-27873/+252
This patch will replace the common/ directory with the spice-common project. It is for now a simple project subdirectory shared with spice-gtk, but the goal is to make it a proper library later on. With this change, the spice-server build is broken. The following commits fix the build, and have been seperated to ease the review. v2 - moves all the generated marshallers to spice-common library - don't attempt to fix windows VS build, which should somehow be splitted with spice-common (or built from tarball only to avoid generation tools/libs deps) v3 - uses libspice-common-client - fix a mutex.h inclusion reported by Alon
2012-03-23sasl: small refactoring, check memcheck != NULLMarc-André Lureau1-10/+8
2012-03-23Use spice_strdup() to avoid crashing on NULLMarc-André Lureau3-10/+10
qemu can call spice_server_set_name(s, NULL) when the name is not given. Let's not crash in this case
2012-03-22server/tests: add resolution changes testerAlon Levy2-6/+80
2012-03-22server/tests/test_display_base: add CommandAlon Levy2-45/+101
add parameters to the commands used for display tests.
2012-03-21server/tests/test_display_base: remove 64bit arch assumptionsAlon Levy1-5/+5
2012-03-21server/red_memslots: don't assume 64 bit environmentAlon Levy2-7/+10
assumption that unsigned long == QXLPHYSICAL causes get_virt to compute the wrong slot. Fix by replacing addr variables to be of type QXLPHYSICAL.
2012-03-21server/red_worker: fix for case where ASSERT is compiled outAlon Levy1-2/+1
2012-03-21server/red_memslots: use QXLPHYSICAL for addressesAlon Levy2-3/+3
Cannot assume unsigned long == QXLPHYSICAL, not true for 32 bit architectures.
2012-03-21server/red_memslots: drop two unused functionsAlon Levy2-19/+0
cb_get_virt and cb_validate_virt have disappeared a long time ago, not needed since: commit 5ac88aa79fa6445f96e5419d8bf4fce81da63b90 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-03-20Don't truncate SPICE_FOREIGN_MENU_SOCKETChristophe Fergeau1-5/+8
When we get the socket name for the foreign menu socket from an environment variable, we cannot make assumptions about its length. Currently, we are strncpying to a 50 byte buffer which is easily too small.
2012-03-20Don't limit spice controller socket name to 50 charsChristophe Fergeau1-6/+4
The spice controller socket name used to be hardcoded to /tmp/SpiceController-%lu.uds and generated using snprintf. A 50 bytes buffer was enough for that, but this was changed in commit 79fffbf95 because this was predictable and allowed other users on the system to sniff the browser/client communication. spicec now uses the value of the environment SPICE_XPI_SOCKET as the name of the socket to use. However, since the name that is used is no longer generated by spicec, no assumption can be made about its size. Currently, the socket is created inside the user home directory, which means that if the user name is too long, spicec will not be able to read the controller socket name. This commit directly uses the string from getenv as he name of the controller socket (on Linux) instead of limiting its size to 50 characters, which should fix this issue. This fixes rhbz #804561