[Spice-devel] Possible SPICE/QEMU deadlock on fast client reconnect

2011-10-21 Thread Daniel P. Berrange
In testing my patches for 'add_client' support with SPICE, I noticed deadlock in the QEMU/SPICE code. It only happens if I close a SPICE client and then immediately reconnect within about 1 second. If I wait a couple of seconds before reconnecting the SPICE client I don't see the deadlock. I'm usi

Re: [Spice-devel] [PATCH 0/6] Add new libspice-server.so APIs for injecting client sockets

2011-10-24 Thread Daniel P. Berrange
On Sun, Oct 23, 2011 at 10:32:10AM +0200, Alon Levy wrote: > On Fri, Oct 21, 2011 at 04:10:58PM +0100, Daniel P. Berrange wrote: > > QEMU has a monitor command 'add_client' which can be used over > > a UNIX domain socket connection with SCM_RIGHTS, to pass a > > pre-

Re: [Spice-devel] Possible SPICE/QEMU deadlock on fast client reconnect

2011-10-24 Thread Daniel P. Berrange
On Sun, Oct 23, 2011 at 09:37:59AM +0200, Yonit Halperin wrote: > Hi, > > Sounds like https://bugzilla.redhat.com/show_bug.cgi?id=746950 and > https://bugs.freedesktop.org/show_bug.cgi?id=41858 > Alon's patch: > http://lists.freedesktop.org/archives/spice-devel/2011-September > /005369.html > Shou

Re: [Spice-devel] [PATCH 2/6] Rename __reds_accept_connection into reds_init_client_connection

2011-10-28 Thread Daniel P. Berrange
On Wed, Oct 26, 2011 at 03:29:55PM +0200, Marc-André Lureau wrote: > Hi > > I would move the cb intialization in reds_init_client_connection () to > avoid duplication: > > stream = link->stream; > stream->read = stream_read_cb; > stream->write = stream_write_cb; > stream->writev =

[Spice-devel] [PATCH 0/6 v2] Add new libspice-server.so APIs for injecting client sockets

2011-10-28 Thread Daniel P. Berrange
An update to: http://lists.freedesktop.org/archives/spice-devel/2011-October/005834.html QEMU has a monitor command 'add_client' which can be used over a UNIX domain socket connection with SCM_RIGHTS, to pass a pre-opened client socket connection FD for graphics displays. This series adds two n

[Spice-devel] [PATCH 1/6] Merge reds_accept_connection into reds_accept

2011-10-28 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Neither reds_accept_connection or reds_accept are very long, so the split is pointless & increases code size for no gain. Merge them together to reduce code size * server/reds.c: Merge reds_accept_connection into reds_accept Signed-off-by: Dani

[Spice-devel] [PATCH 2/6] Rename __reds_accept_connection into reds_init_client_connection

2011-10-28 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Remove the accept() call from __reds_accept_connection and rename it to reds_init_client_connection. The caller is now responsible for accepting the new socket. The method reds_init_client_connection merely initializes it for usage. * server/r

[Spice-devel] [PATCH 3/6] Move SSL setup out of reds_accept_ssl_connection

2011-10-28 Thread Daniel P. Berrange
From: "Daniel P. Berrange" To allow setup of an SSL client, from a passed in client socket, move all the SSL client initialization code out of reds_accept_ssl_connection and into a new method called reds_init_client_ssl_connection * server/reds.c: Introduce reds_init_client_ssl_

[Spice-devel] [PATCH 4/6] Add APIs for injecting a client connection socket

2011-10-28 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Allow applications to pass a pre-accepted client socket file descriptor in. The new APIs are spice_server_add_ssl_client and spice_server_add_client * server/reds.c: Implement new APIs * server/spice.h: Define new APIs Signed-off-by: Daniel P. Berrange -

[Spice-devel] [PATCH 5/6] Allow auth to be skipped when attaching to pre-accepted clients

2011-10-28 Thread Daniel P. Berrange
From: "Daniel P. Berrange" When an applications passes in a pre-accepted socket for a client, they may well have already performed suitable authentication out of band. They should thus have the option to request that any spice authentication is skipped. * server/reds.c, spice.h: Ad

[Spice-devel] [PATCH 6/6] Do not assume that SPICE is using a TCP socket

2011-10-28 Thread Daniel P. Berrange
From: "Daniel P. Berrange" If setting the TCP_NODELAY socket option fails with ENOTSUP, then don't treat this is a fatal error. SPICE is likely just running over a UNIX socket instead. * server/inputs_channel.c: Ignore TCP_NODELAY socket opt fails Signed-off-by: Daniel P. Berran

Re: [Spice-devel] [PATCH 4/6] Add APIs for injecting a client connection socket

2011-10-28 Thread Daniel P. Berrange
On Fri, Oct 28, 2011 at 03:03:57PM +0200, Gerd Hoffmann wrote: > Hi, > > > diff --git a/server/spice-server.syms b/server/spice-server.syms > > index f1374bd..c34ff86 100644 > > --- a/server/spice-server.syms > > +++ b/server/spice-server.syms > > @@ -89,5 +89,7 @@ global: > > spice_server_

[Spice-devel] Wiki antispam changes

2011-11-10 Thread Daniel P. Berrange
FYI, I have just gone through and deleted about 200 spam pages from the wiki. As an anti-spam meansure, all users on the wiki must confirm their email address before they will be allowed to make further edits. This can be done from the user preferences page after logging in, or just try to edit a

Re: [Spice-devel] spice manuals - repository / docs dir in spice?

2011-11-24 Thread Daniel P. Berrange
On Thu, Nov 24, 2011 at 02:43:52PM +0200, Alon Levy wrote: > Hi, > > I want to finally have some work on the odt manuals we currently have, > if only to mark stuff as "obsolete / not up to date" and fix simple to > fix things (like mentioning vdagent now supports Linux/Win7/Win2008). > > But

Re: [Spice-devel] spice manuals - repository / docs dir in spice?

2011-11-24 Thread Daniel P. Berrange
On Thu, Nov 24, 2011 at 05:12:30PM +0200, Alon Levy wrote: > On Thu, Nov 24, 2011 at 01:15:48PM +0000, Daniel P. Berrange wrote: > > On Thu, Nov 24, 2011 at 02:43:52PM +0200, Alon Levy wrote: > > > Hi, > > > > > > I want to finally have some work on the odt

[Spice-devel] [PATCH 0/6 v3] Add new libspice-server.so APIs for injecting client sockets

2011-12-12 Thread Daniel P. Berrange
An update to: v2: http://lists.freedesktop.org/archives/spice-devel/2011-October/005881.html v1: http://lists.freedesktop.org/archives/spice-devel/2011-October/005834.html QEMU has a monitor command 'add_client' which can be used over a UNIX domain socket connection with SCM_RIGHTS, to pass a p

[Spice-devel] [PATCH 1/6] Merge reds_accept_connection into reds_accept

2011-12-12 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Neither reds_accept_connection or reds_accept are very long, so the split is pointless & increases code size for no gain. Merge them together to reduce code size * server/reds.c: Merge reds_accept_connection into reds_accept Signed-off-by: Dani

[Spice-devel] [PATCH 2/6] Rename __reds_accept_connection into reds_init_client_connection

2011-12-12 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Remove the accept() call from __reds_accept_connection and rename it to reds_init_client_connection. The caller is now responsible for accepting the new socket. The method reds_init_client_connection merely initializes it for usage. * server/r

[Spice-devel] [PATCH 3/6] Move SSL setup out of reds_accept_ssl_connection

2011-12-12 Thread Daniel P. Berrange
From: "Daniel P. Berrange" To allow setup of an SSL client, from a passed in client socket, move all the SSL client initialization code out of reds_accept_ssl_connection and into a new method called reds_init_client_ssl_connection * server/reds.c: Introduce reds_init_client_ssl_

[Spice-devel] [PATCH 4/6] Add APIs for injecting a client connection socket

2011-12-12 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Allow applications to pass a pre-accepted client socket file descriptor in. The new APIs are spice_server_add_ssl_client and spice_server_add_client * server/reds.c: Implement new APIs * server/spice.h: Define new APIs Signed-off-by: Daniel P. Berrange -

[Spice-devel] [PATCH 5/6] Allow auth to be skipped when attaching to pre-accepted clients

2011-12-12 Thread Daniel P. Berrange
From: "Daniel P. Berrange" When an applications passes in a pre-accepted socket for a client, they may well have already performed suitable authentication out of band. They should thus have the option to request that any spice authentication is skipped. * server/reds.c, spice.h: Ad

[Spice-devel] [PATCH 6/6] Do not assume that SPICE is using a TCP socket

2011-12-12 Thread Daniel P. Berrange
From: "Daniel P. Berrange" If setting the TCP_NODELAY socket option fails with ENOTSUP, then don't treat this is a fatal error. SPICE is likely just running over a UNIX socket instead. * server/inputs_channel.c: Ignore TCP_NODELAY socket opt fails Signed-off-by: Daniel P. Berran

Re: [Spice-devel] [PATCH 0/6 v3] Add new libspice-server.so APIs for injecting client sockets

2011-12-12 Thread Daniel P. Berrange
On Mon, Dec 12, 2011 at 11:56:51AM -0500, Marc-André Lureau wrote: > Hi Daniel > > - Mensaje original - > > An update to: > > > > v2: > > http://lists.freedesktop.org/archives/spice-devel/2011-October/005881.html > > v1: > > http://lists.freedesktop.org/archives/spice-devel/2011-Octob

Re: [Spice-devel] License in server/red_parse_qxl.h is GPL, not LGPL

2011-12-14 Thread Daniel P. Berrange
On Wed, Dec 14, 2011 at 09:02:52AM -0700, Bruce Rogers wrote: > When trying to submit a spice package to openSUSE, > our licensing team noticed that the file server/red_parse_qxl.h > is GPL-2.0+. This seems like an oversight, particularly as the > corresponding red_parse_qxl.c file right next to th

Re: [Spice-devel] 答复: Re: 答复: Re: hi,everyone. anyone do spice client on mac os x?

2012-01-09 Thread Daniel P. Berrange
On Mon, Jan 09, 2012 at 05:05:04PM +0100, David Jaša wrote: > Alon Levy píše v Po 09. 01. 2012 v 17:22 +0200: > > On Mon, Jan 09, 2012 at 03:21:46PM +0100, David Jaša wrote: > > > Alon Levy píše v Po 09. 01. 2012 v 14:11 +0200: > > > > On Mon, Jan 09, 2012 at 12:21:43PM +0100, Christophe Fergeau wr

[Spice-devel] [00/17] Misc code style cleanups & adding 'syntax-check' make rule

2012-01-10 Thread Daniel P. Berrange
In libvirt we use GNULIB, which provides a useful extra make rule 'syntax-check' for validating all sorts of common code style bugs. This keeps the code looking sane & detects certain real bugs and/or redundant coding patterns. Although SPICE doesn't use GNULIB it is trivial to copy the make rules

[Spice-devel] [PATCH 02/17] Remove useless if() before free()

2012-01-10 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The free() function allows NULL to be passed in, so any code which puts a if() before free() is wasting time --- common/canvas_base.c |8 ++-- common/canvas_utils.c|4 +--- common/gdi_canvas.c |4 +-

[Spice-devel] [PATCH 03/17] Rewrite code to avoid triggering warning about casting param to free()

2012-01-10 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Since free() takes a void* parameters do not need to be cast. The existing code here is actally fine, but it trips up the syntax-check rule, so tweak it to an equivalent construct which passes the syntax check --- server/smartcard.c |3 ++- 1 files

[Spice-devel] [PATCH 04/17] Remove casts from void * with xrealloc() calls

2012-01-10 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The xrealloc() function returns void*, so the return value never needs to be cast --- common/lines.c | 22 ++ 1 files changed, 10 insertions(+), 12 deletions(-) diff --git a/common/lines.c b/common/lines.c index 9b47ee3..797d5d6 10

[Spice-devel] [PATCH 05/17] Fill out the AUTHORS file with some content

2012-01-10 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The AUTHORS file is empty, fill it in with a list of present and past maintainers, and email addresses of all people who have contributed patches --- AUTHORS | 33 + 1 files changed, 33 insertions(+), 0 deletions(-) di

[Spice-devel] [PATCH 06/17] Improve usefulness of README file

2012-01-10 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The COPYING file already contains the license text, so the README file need not repeat it. Instead put in a description of what SPICE is, simple install instructions & pointers to mailing lists and bug trackers ---

[Spice-devel] [PATCH 07/17] Fix up copyright decl to always use 'Copyright (C) Red Hat, Inc.'

2012-01-10 Thread Daniel P. Berrange
From: "Daniel P. Berrange" A couple of files were missing '(C)' in the copyright header --- common/backtrace.c |2 +- common/lz.c |2 +- common/lz_compress_tmpl.c |2 +- common/lz_decompress_tmpl.c |2 +- 4 files changed, 4 insert

[Spice-devel] [PATCH 08/17] Always quote first arg to AC_DEFINE

2012-01-10 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The first arg to AC_DEFINE should always be quoted --- configure.ac |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 861e939..b98f831 100644 --- a/configure.ac +++ b/configure.ac @@ -

[Spice-devel] [PATCH 09/17] Remove unused assert.h include

2012-01-10 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The assert.h include was never used in any code --- server/main_dispatcher.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/server/main_dispatcher.c b/server/main_dispatcher.c index a5967fa..2ccf534 100644 --- a/server/main_dispatch

[Spice-devel] [PATCH 10/17] Remove 'the the' typos

2012-01-10 Thread Daniel P. Berrange
From: "Daniel P. Berrange" --- server/jpeg_encoder.h |2 +- server/red_tunnel_worker.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/jpeg_encoder.h b/server/jpeg_encoder.h index 2b8d8b2..74c7324 100644 --- a/server/jpeg_encoder.h ++

[Spice-devel] [PATCH 11/17] Remove trailing blank lines

2012-01-10 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Remove any blank lines at the end of all source files --- TODO.multiclient|1 - autogen.sh |1 - client/application.cpp |1 - client/app

[Spice-devel] [PATCH 12/17] Remove unused backup file

2012-01-10 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The common/glc.c.save file appears to be a obsolete copy of glc.c --- common/glc.c.save | 1413 - 1 files changed, 0 insertions(+), 1413 deletions(-) delete mode 100644 common/glc.c.save diff --gi

[Spice-devel] [PATCH 13/17] Remove bogus include of strings.h

2012-01-10 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The tests include strings.h but don't need any of its functions --- server/tests/basic_event_loop.c |1 - server/tests/test_empty_success.c |1 - server/tests/test_just_sockets_no_ssl.c |1 - server/tests/test_playback.c

[Spice-devel] [PATCH 14/17] Add missing includes of config.h

2012-01-10 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Not all files were including config.h --- common/backtrace.c |2 +- server/dispatcher.c |1 + server/main_dispatcher.c|1 + server/tests/basic_ev

[Spice-devel] [PATCH 16/17] Remove trailing whitespace from end of lines

2012-01-10 Thread Daniel P. Berrange
From: "Daniel P. Berrange" --- TODO.multiclient |2 +- client/display_channel.cpp |2 +- client/glz_decode_tmpl.c |2 +- client/jpeg_decoder.cpp |2 +- client/red_

[Spice-devel] [PATCH 15/17] Replace test XXX -a YYY with test XXX && test YYY

2012-01-10 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The '-a' and '-o' operators to test are not portable. Always combine two invocations of 'test' using || or && instead. --- configure.ac | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/co

Re: [Spice-devel] [PATCH 07/17] Fix up copyright decl to always use 'Copyright (C) Red Hat, Inc.'

2012-01-12 Thread Daniel P. Berrange
On Thu, Jan 12, 2012 at 01:34:32PM +0200, Alon Levy wrote: > On Tue, Jan 10, 2012 at 03:58:28PM +0000, Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > A couple of files were missing '(C)' in the copyright header > > It's

Re: [Spice-devel] [PATCH 11/17] Remove trailing blank lines

2012-01-12 Thread Daniel P. Berrange
On Thu, Jan 12, 2012 at 01:38:00PM +0200, Alon Levy wrote: > On Tue, Jan 10, 2012 at 03:58:32PM +0000, Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > ACK. > > Meant to ask about the command regarding this patch, i.e. some sed > command?

Re: [Spice-devel] [PATCH 05/17] Fill out the AUTHORS file with some content

2012-01-12 Thread Daniel P. Berrange
On Thu, Jan 12, 2012 at 01:29:43PM +0200, Alon Levy wrote: > On Tue, Jan 10, 2012 at 03:58:26PM +0000, Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > The AUTHORS file is empty, fill it in with a list of present and > > past maintainers,

Re: [Spice-devel] [PATCH 17/17] Add a 'syntax-check' make target

2012-01-12 Thread Daniel P. Berrange
On Thu, Jan 12, 2012 at 01:47:43PM +0200, Alon Levy wrote: > On Tue, Jan 10, 2012 at 03:58:38PM +0000, Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > Looked-at-by: Alon Levy > > Didn't understand the XXX in cfg.mk, other then that A

Re: [Spice-devel] [PATCH 01/17] Death to all TABs

2012-01-12 Thread Daniel P. Berrange
On Thu, Jan 12, 2012 at 01:27:14PM +0100, Paolo Bonzini wrote: > On 01/12/2012 12:32 PM, Alon Levy wrote: > >> autogen.sh| 42 +- > >> client/demarshallers.h|2 +- > >> client/glz_decoder_config.h | 12 +- > >> client/red_channel.h | 14 +- > >>

Re: [Spice-devel] Intend to release spice-0.10.1

2012-01-12 Thread Daniel P. Berrange
On Thu, Jan 12, 2012 at 05:44:23PM +0100, Hans de Goede wrote: > Hi, > > I intend to release a spice-0.10.1 soon to get the > accumulated assorted fixes out there. I intend to > go over the commits in master and cherry pick > all commits which are clear and simple fixes. > > If you've something y

Re: [Spice-devel] [00/17] Misc code style cleanups & adding 'syntax-check' make rule

2012-01-13 Thread Daniel P. Berrange
On Tue, Jan 10, 2012 at 03:58:21PM +, Daniel P. Berrange wrote: > In libvirt we use GNULIB, which provides a useful extra make rule > 'syntax-check' for validating all sorts of common code style bugs. > This keeps the code looking sane & detects certain real bugs an

Re: [Spice-devel] [00/17] Misc code style cleanups & adding 'syntax-check' make rule

2012-01-13 Thread Daniel P. Berrange
On Fri, Jan 13, 2012 at 01:30:42PM +, Daniel P. Berrange wrote: > On Tue, Jan 10, 2012 at 03:58:21PM +0000, Daniel P. Berrange wrote: > > In libvirt we use GNULIB, which provides a useful extra make rule > > 'syntax-check' for validating all sorts of common code style

Re: [Spice-devel] [PATCH spice] server: Don't complain if setsockopt NODELAY fails on unix sockets

2012-01-18 Thread Daniel P. Berrange
On Wed, Jan 18, 2012 at 10:50:08AM +0100, Hans de Goede wrote: > 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

Re: [Spice-devel] [PATCH 1/7] Fix line length errors in main_channel

2012-01-19 Thread Daniel P. Berrange
On Thu, Jan 19, 2012 at 02:09:58PM -0600, Dan McGee wrote: > 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

Re: [Spice-devel] [Spice-commits] configure.ac

2012-01-23 Thread Daniel P. Berrange
On Mon, Jan 23, 2012 at 01:19:51PM +0100, Christophe Fergeau wrote: > On Mon, Jan 23, 2012 at 03:17:08AM -0800, Marc-André Lureau wrote: > > configure.ac |8 > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > New commits: > > commit c5cf7fb3bc4b48ee10c8128d4f2670f870fedad8 >

Re: [Spice-devel] Setting the default size of a spice-gtk window

2012-02-01 Thread Daniel P. Berrange
On Wed, Feb 01, 2012 at 02:39:13AM +0100, Dominique Rodrigues wrote: > > Le 01/02/2012 00:52, Marc-André Lureau a écrit : > >Hi > > > >- Mensaje original - > >>I am using spice-gtk for a while now and I did not find yet an option > >>to launch it with a predefined size (height and width).

Re: [Spice-devel] Setting the default size of a spice-gtk window

2012-02-01 Thread Daniel P. Berrange
On Wed, Feb 01, 2012 at 03:22:35PM +0100, Dominique Rodrigues wrote: > Le 01/02/2012 11:01, Daniel P. Berrange a écrit : > >On Wed, Feb 01, 2012 at 02:39:13AM +0100, Dominique Rodrigues wrote: > >>Le 01/02/2012 00:52, Marc-André Lureau a écrit : > >>>Hi >

[Spice-devel] [PATCH] Don't warn if setsockopt(TCP_NDELAY) fails with errno==ENOTSUP

2012-02-07 Thread Daniel P. Berrange
From: "Daniel P. Berrange" If connecting to a UNIX domain socket, it is expected that the setsockopt(TCP_NDELAY) call will fail with errno=ENOTSUP, so don't issue a warning in that case --- gtk/spice-channel.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --

Re: [Spice-devel] [PATCH] Don't warn if setsockopt(TCP_NDELAY) fails with errno==ENOTSUP

2012-02-09 Thread Daniel P. Berrange
On Tue, Feb 07, 2012 at 11:48:21AM -0500, Marc-André Lureau wrote: > ack, (will push if you don't have commit access) Yes please, I don't have access, though I have filed a freedesktop.org BZ to get an account created. Daniel > > - Mensaje original - > >

Re: [Spice-devel] [PATCH 1/7] Add configure-time check for -Wl, --version-script option

2012-02-17 Thread Daniel P. Berrange
On Thu, Feb 16, 2012 at 11:30:07PM -0600, Dan McGee wrote: > 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-

Re: [Spice-devel] [PATCH 5/7] red_worker: reimplement event loop using poll()

2012-02-17 Thread Daniel P. Berrange
On Fri, Feb 17, 2012 at 12:53:48PM +0100, Paolo Bonzini wrote: > On 02/17/2012 10:05 AM, Alon Levy wrote: > > The patch itself looks ok, but I'm not sure I like the direction. Why > > not specialize, have epoll for linux and poll if epoll isn't supported? > > - double the code > > + no possible r

Re: [Spice-devel] xpi, spicec, remote-viewer & update-alternatives

2012-02-23 Thread Daniel P. Berrange
On Thu, Feb 23, 2012 at 03:38:28PM +0100, David Jaša wrote: > Hi, > > there is a problem with running the controller driven clients: > > * spice-xpi doesn't pass any option to spice-xpi-client symlink > * remote-viewer expects --spice-controller option This shouldn't be any problem,

Re: [Spice-devel] xpi, spicec, remote-viewer & update-alternatives

2012-02-24 Thread Daniel P. Berrange
On Fri, Feb 24, 2012 at 09:22:14AM +0100, Gianluca Cecchi wrote: > On Thu, Feb 23, 2012 at 6:40 PM, David Jaša wrote: > >> >       * remote-viewer is modified so that it behaves like when run with > >> >         --spice-controller option if file speficied SPICE_XPI_SOCKET > >> >         exists, ig

Re: [Spice-devel] [PATCH spice-xpi 2/4] build: use spice-protocol as a submodule

2012-02-24 Thread Daniel P. Berrange
On Fri, Feb 24, 2012 at 01:46:13PM +0200, Alon Levy wrote: > On Fri, Feb 24, 2012 at 06:08:38AM -0500, Marc-André Lureau wrote: > > Hi > > > > - Mensaje original - > > > On Fri, Feb 24, 2012 at 11:54:36AM +0100, Marc-André Lureau wrote: > > > > > > Is it just me or does this patch do way m

Re: [Spice-devel] [PATCH spice-gtk 1/3] build: move @SPICE_GLIB_REQUIRES@ to Requires.private

2012-03-07 Thread Daniel P. Berrange
On Wed, Mar 07, 2012 at 10:16:48PM +0200, Alon Levy wrote: > On Wed, Mar 07, 2012 at 09:09:33PM +0100, Marc-André Lureau wrote: > > The libraries listed in Requires aren't needed during build time, they > > are library depedencies. And since this is only needed if linking > > statically, we can saf

Re: [Spice-devel] [PATCH 1/2] server: don't fail on ENOSUP from setsockopt calls

2012-03-09 Thread Daniel P. Berrange
On Fri, Mar 09, 2012 at 10:39:21AM -0500, Nahum Shalman wrote: > These are the only instances in the code base where functions fail as a > result of setsockopt calls returning ENOSUP. > Those calls will always return ENOSUP when we are listening on a UNIX > socket rather than a TCP port. > We'd pre

Re: [Spice-devel] [PATCH 2/2] server: support listening on a UNIX socket

2012-03-09 Thread Daniel P. Berrange
On Fri, Mar 09, 2012 at 10:39:22AM -0500, Nahum Shalman wrote: > We leave all the hard work of setting up the socket to qemu. > This will cause all of the TCP setsockopt calls to return ENOSUP > but that is okay. > --- > server/reds.c| 21 + > server/spice-server.

Re: [Spice-devel] [PATCH 1/2] server: don't fail on ENOPROTOOPT from setsockopt

2012-03-09 Thread Daniel P. Berrange
On Fri, Mar 09, 2012 at 12:26:50PM -0500, Nahum Shalman wrote: > If we allow listening on arbitrary sockets like unix sockets, > we can get ENOPROTOOPT errors from setsockopt calls that set TCP > specific options. This should be allowed to happen. > --- > server/inputs_channel.c |2 +- > serv

Re: [Spice-devel] spice-xpi

2012-03-13 Thread Daniel P. Berrange
On Tue, Mar 13, 2012 at 08:58:26AM -0400, Marc-André Lureau wrote: > > > - Mensaje original - > > glog is missing the "modified" method name, which is added by the > > patch. > > QA guys rely especially on the method name. > > That's the problem: we can't refactor, rename function, add >

[Spice-devel] [PATCH spice-gtk 00/15] Expand usage of compiler warnings

2012-03-13 Thread Daniel P. Berrange
The current spice-gtk configure.ac script only enables -Wall -Wno-sign-compare -Werror -Wno-deprecated-declarations IMHO, this is not enough, and applications should strive to enable as many GCC warning options as is practical for their codebase. Rather than taking a whitelist approach to compil

[Spice-devel] [PATCH spice-gtk 01/15] Don't delete gtk-doc.make in distclean

2012-03-13 Thread Daniel P. Berrange
From: "Daniel P. Berrange" gtk-doc.make is created by autogen.sh, therefore it should not be deleted in distclean, only maintainerclean --- Makefile.am |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile.am b/Makefile.am index 73b5531..8ab020a 10

[Spice-devel] [PATCH spice-gtk 02/15] Remove non-existant include directories from CFLAGS

2012-03-13 Thread Daniel P. Berrange
From: "Daniel P. Berrange" --- gtk/Makefile.am |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/gtk/Makefile.am b/gtk/Makefile.am index ed40ce8..2057b5a 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -63,8 +63,6 @@ SPICE_COMMON_CPPFLAGS = \

[Spice-devel] [PATCH spice-gtk 03/15] Fix const-correctness of functions & add explicit casts

2012-03-13 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Some functions should be declared to take const char * instead of plain char *. In other places we intentionally cast away const-ness, so we should add explicit casts to stop compiler warnings --- gtk/snappy.c |2 +- gtk/spice-channel.c |

[Spice-devel] [PATCH spice-gtk 04/15] Fix old style declaration where 'inline' came after return type

2012-03-13 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Fix a case of 'static int inline' to be 'static inline int' --- common/lines.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/lines.c b/common/lines.c index 1a14c18..ee52a46 100644 --- a/common/lines.c

[Spice-devel] [PATCH spice-gtk 05/15] Fix deprecation warning handling

2012-03-13 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Various methods are deprecated by using the G_GNUC_DEPRECATED_FOR macro. Unfortunately this macro was placed in the .c file impl, instead of the .h file decl. Thus applications building against SPICE-GTK would never see the deprecation warnings. At the

[Spice-devel] [PATCH spice-gtk 06/15] Avoid warnings about empty conditional statement bodies

2012-03-13 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Add extra {} braces around if/else statements which only call SPICE_DEBUG to avoid: ../common/ssl_verify.c: In function 'verify_pubkey': ../common/ssl_verify.c:87:50: warning: suggest braces around empty body in an 'else' stat

[Spice-devel] [PATCH spice-gtk 07/15] Fix some integer range checks which always evaluate false

2012-03-13 Thread Daniel P. Berrange
From: "Daniel P. Berrange" There are some integer range checks which always evaluate false due to use of unsigned integer types. One of these would prevent detection of encoding errors from celt. The others are simply no-ops. * gtk/channel-record.c: Make 'frame_size' signe

[Spice-devel] [PATCH spice-gtk 08/15] Remove arithmetic on void* pointers

2012-03-13 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Arithmetic on void * pointers is undefined by the C standard. Convert the one case of this to use guint8 instead. * gtk/channel-main.c: s/void */guint8 */ --- gtk/channel-main.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/g

[Spice-devel] [PATCH spice-gtk 09/15] Replace duplicated header declarations

2012-03-13 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The usb-helper-acl.h header file duplicated some declarations already present in usb-device-manager.h The channel-display.c file declared the object init function which is already done by the GObject helper macros * gtk/channel-display.c: Remove duplica

[Spice-devel] [PATCH spice-gtk 10/15] Add printf format annotations to all '...' functions

2012-03-13 Thread Daniel P. Berrange
From: "Daniel P. Berrange" To allow the compile to detect incorrect printf formats, any var-args function should have a format annotation * common/macros.h: Helper to define ATTR_PRINTF for code which can't depend on glib * common/canvas_base.c, common/lz.h, common/macros.h:

[Spice-devel] [PATCH spice-gtk 11/15] Ensure all no-args methods are declared (void) not ()

2012-03-13 Thread Daniel P. Berrange
From: "Daniel P. Berrange" * common/quic.c, common/rop3.c, common/sw_canvas.c, gtk/spice-client-glib-usb-acl-helper.c: s/()/(void)/ --- common/quic.c |6 +++--- common/rop3.c |8 common/sw_canvas.c

[Spice-devel] [PATCH spice-gtk 12/15] Add missing includes & make some functions static

2012-03-13 Thread Daniel P. Berrange
From: "Daniel P. Berrange" A number of functions were used without prior declaration. In some cases this was due to missing include files. In other cases the functions should have just been static. Ideally this would allow -Wmissing-declarations to be enabled, but the files ge

[Spice-devel] [PATCH spice-gtk 13/15] Fix no-arg functions declared () to use (void)

2012-03-13 Thread Daniel P. Berrange
From: "Daniel P. Berrange" * common/quic.h, common/rop3.h, common/sw_canvas.h: s/()/(void)/ --- common/quic.h |2 +- common/rop3.h |2 +- common/sw_canvas.h |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/quic.h b/common/quic.h ind

[Spice-devel] [PATCH spice-gtk 14/15] Remove some large stack allocations

2012-03-13 Thread Daniel P. Berrange
From: "Daniel P. Berrange" A few functions have very large arrays declared on the stack. Replace these with heap allocations, to reduce risk of stack overflows in deep callpaths --- gtk/channel-playback.c |6 -- gtk/spice-channel.c| 16 2 files c

[Spice-devel] [PATCH spice-gtk 15/15] Import GNULIB's GCC warning macros

2012-03-13 Thread Daniel P. Berrange
From: "Daniel P. Berrange" GNULIB has a helpful module 'manywarnings' which makes it easy to turn on every single GCC warning. The general goal is that every possible GCC warning should be enabled, except for certain blacklisted warnings. This imports the GNULIB m4

Re: [Spice-devel] [PATCH spice-gtk 14/15] Remove some large stack allocations

2012-03-13 Thread Daniel P. Berrange
On Tue, Mar 13, 2012 at 01:40:12PM +, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > A few functions have very large arrays declared on the stack. > Replace these with heap allocations, to reduce risk of stack > overflows in deep callpaths > --- >

Re: [Spice-devel] [PATCH spice-gtk 14/15] Remove some large stack allocations

2012-03-13 Thread Daniel P. Berrange
On Tue, Mar 13, 2012 at 02:56:07PM +0100, Hans de Goede wrote: > Hi, > > On 03/13/2012 02:40 PM, Daniel P. Berrange wrote: > >From: "Daniel P. Berrange" > > > >A few functions have very large arrays declared on the stack. > >Replace these wit

Re: [Spice-devel] [PATCH spice-gtk 00/15] Expand usage of compiler warnings

2012-03-13 Thread Daniel P. Berrange
On Tue, Mar 13, 2012 at 09:57:25AM -0400, Marc-André Lureau wrote: > > > - Mensaje original - > > The first 14 patches in this series fix misc issues in the code > > which would otherwise trigger warnings. The last patch actually > > enables the warnings. It also enables some GCC runtime

Re: [Spice-devel] [PATCH spice-gtk 00/15] Expand usage of compiler warnings

2012-03-13 Thread Daniel P. Berrange
On Tue, Mar 13, 2012 at 03:00:04PM +0100, Hans de Goede wrote: > Hi, > > Series looks good. I've a few remarks on patch 14/15 though. Also > if you're enable ssp why not also add -DFORTIFY_SOURCE=2 ? We do actually, but not via a compile flag. Instead it uses AC_DEFINE(_FORTIFY_SOURCE, 2), which

Re: [Spice-devel] [PATCH spice-gtk 00/15] Expand usage of compiler warnings

2012-03-13 Thread Daniel P. Berrange
On Tue, Mar 13, 2012 at 03:33:46PM +0100, Hans de Goede wrote: > Hi, > > On 03/13/2012 03:23 PM, Daniel P. Berrange wrote: > >On Tue, Mar 13, 2012 at 03:00:04PM +0100, Hans de Goede wrote: > >>Hi, > >> > >>Series looks good. I've a few remarks on pa

Re: [Spice-devel] [PATCH spice-gtk 00/15] Expand usage of compiler warnings

2012-03-14 Thread Daniel P. Berrange
> + uuid[2], uuid[3], uuid[4], uuid[5], > + uuid[6], uuid[7], uuid[8], uuid[9], > + uuid[10], uuid[11], uuid[12], uuid[13], > + uuid[14], uuid[15]); > + > +return uuidstr; > } > > typedef struct { I don't think this is

Re: [Spice-devel] [PATCH spice-gtk] Move undef FORTIFY below config.h

2012-03-14 Thread Daniel P. Berrange
On Wed, Mar 14, 2012 at 08:43:20PM +0100, Marc-André Lureau wrote: > It used to be below, then was moved on top of all, but now it's > defined in config.h. Hopefully below config.h is the right > place. config.h should never have direct includes anyway. > --- > gtk/continuation.c |4 ++-- > 1

Re: [Spice-devel] log file for spice-gtk

2012-03-15 Thread Daniel P. Berrange
On Thu, Mar 15, 2012 at 11:14:15AM +0200, Yonit Halperin wrote: > Hi, > > Are there any plans to have a log file for spice-gtk? > I think that it is very important to have logging with configurable > debug level via a configuration file. It will be helpful for live > debugging of user problems tha

Re: [Spice-devel] log file for spice-gtk

2012-03-15 Thread Daniel P. Berrange
On Thu, Mar 15, 2012 at 12:39:13PM +0200, Alon Levy wrote: > On Thu, Mar 15, 2012 at 10:23:28AM +0000, Daniel P. Berrange wrote: > > On Thu, Mar 15, 2012 at 11:14:15AM +0200, Yonit Halperin wrote: > > > Hi, > > > > > > Are there any plans to have a log file for

Re: [Spice-devel] Failing to compile spice-gtk: generated_marshallers1.c:2:25: fatal error: marshallers.h: No such file or directory

2012-03-19 Thread Daniel P. Berrange
On Mon, Mar 19, 2012 at 07:02:17AM -0400, Marc-André Lureau wrote: > > > - Original Message - > > On Mon, Mar 19, 2012 at 12:11:35PM +0200, Yaniv Kaul wrote: > > > On 03/19/2012 12:01 PM, Marc-André Lureau wrote: > > > >Hi > > > > > > > >The generated files need to be regenerated. I guess

Re: [Spice-devel] Failing to compile spice-gtk: generated_marshallers1.c:2:25: fatal error: marshallers.h: No such file or directory

2012-03-19 Thread Daniel P. Berrange
On Mon, Mar 19, 2012 at 12:09:46PM +0100, Marc-André Lureau wrote: > On Mon, Mar 19, 2012 at 12:05 PM, Daniel P. Berrange > wrote: > > That's debatable IMHO - 'make clean' should remove anything that was > > created by a preivous 'make'.  While 'ma

Re: [Spice-devel] Alternate platform exploration

2012-03-29 Thread Daniel P. Berrange
On Thu, Mar 29, 2012 at 03:58:17PM +0200, Attila Sukosd wrote: > Hi Guys, > > I've also been contemplating an alternative html5/js client, and as far as > I remember, Alon proposed an extension to spice-server to actually contain > a http server to serve the content to the browser. > But it seems

[Spice-devel] [PATCH spice 00/12] Add more compiler warnings

2012-04-02 Thread Daniel P. Berrange
A followup to the previous patch which enabled more compiler warnings for spice-gtk. This one does the same for 'spice'. Less to fix now that we have spice-common shared ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesk

[Spice-devel] [PATCH spice 01/12] Don't do arithmetic on void * type, use uint8_t instead

2012-04-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Arithmetic on void * types is non-portable & trivially avoided * server/dispatcher.c: Use uint8_t for arithmetic Signed-off-by: Daniel P. Berrange --- server/dispatcher.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff

[Spice-devel] [PATCH spice 02/12] Fix const-ness violations

2012-04-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" * 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 --- server/red_worker.c |2 +- server/reds.c |4 ++-- 2 files changed, 3 insertions(+), 3

[Spice-devel] [PATCH spice 03/12] Fix multiple printf format problems

2012-04-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" 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 bro

[Spice-devel] [PATCH spice 04/12] Mark functions which never return control

2012-04-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" * 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 --- client/red_channel.cpp |2 +- server/red_worker.c|5 ++

[Spice-devel] [PATCH spice 05/12] Mark some variables as volatile

2012-04-02 Thread Daniel P. Berrange
From: "Daniel P. Berrange" 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: ·

<    1   2   3   >