Re: [Spice-devel] [PATCH spice-gtk] session: copy proxy setting

2013-03-25 Thread Christophe Fergeau
On Mon, Mar 25, 2013 at 03:44:20PM +0100, Marc-André Lureau wrote: > Solve migration falling back to switch-host method when using proxy > set through controller: > > https://bugzilla.redhat.com/show_bug.cgi?id=923894 > --- > gtk/spice-session.c | 19 --- > 1 file changed, 12 inse

[Spice-devel] [PATCH spice-gtk] session: copy proxy setting

2013-03-25 Thread Marc-André Lureau
Solve migration falling back to switch-host method when using proxy set through controller: https://bugzilla.redhat.com/show_bug.cgi?id=923894 --- gtk/spice-session.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/gtk/spice-session.c b/gtk/spice-session.c

Re: [Spice-devel] [spice-xpi 5/5] Add glib Windows logging

2013-03-25 Thread Marc-André Lureau
- Mensaje original - > On Mon, Mar 25, 2013 at 12:18:32PM +0100, Marc-André Lureau wrote: > > On Mon, Mar 25, 2013 at 11:50 AM, Christophe Fergeau > > wrote: > > > I've considered that, but this means I'd have to sanitize the > > > filename for > > > \, '..', and probably some other thin

Re: [Spice-devel] [spice-xpi 4/5] Add SpiceControllerWin class

2013-03-25 Thread Marc-André Lureau
- Mensaje original - > > In general, returning true on success is easier to read. > > This mimics the return value of connect(2), I'd prefer to keep that > (at > least in that patch, can be improved as a separate cleanup as this > needs > changes in SpiceController and SpiceControllerUn

Re: [Spice-devel] [spice-xpi 4/5] Add SpiceControllerWin class

2013-03-25 Thread Christophe Fergeau
Hey, thanks for the detailed review! A few questions below, On Sun, Mar 24, 2013 at 11:27:45PM +0100, Marc-André Lureau wrote: > On Sun, Mar 24, 2013 at 12:16 PM, Christophe Fergeau > wrote: > > +SpiceControllerWin::~SpiceControllerWin() > > +{ > > +} > > + > > +int SpiceControllerWin::Connect()

Re: [Spice-devel] [spice-xpi 5/5] Add glib Windows logging

2013-03-25 Thread Christophe Fergeau
On Mon, Mar 25, 2013 at 12:18:32PM +0100, Marc-André Lureau wrote: > On Mon, Mar 25, 2013 at 11:50 AM, Christophe Fergeau > wrote: > > I've considered that, but this means I'd have to sanitize the filename for > > \, '..', and probably some other things I didn't think of. As this is just > > a deb

Re: [Spice-devel] [spice-xpi 5/5] Add glib Windows logging

2013-03-25 Thread Marc-André Lureau
On Mon, Mar 25, 2013 at 11:50 AM, Christophe Fergeau wrote: > I've considered that, but this means I'd have to sanitize the filename for > \, '..', and probably some other things I didn't think of. As this is just > a debugging help, I've chosen to go with a hardcoded filename which does > not nee

Re: [Spice-devel] [spice-xpi 5/5] Add glib Windows logging

2013-03-25 Thread Christophe Fergeau
On Sun, Mar 24, 2013 at 11:27:41PM +0100, Marc-André Lureau wrote: > > +} > > + > > +static void glib_setup_logging(void) > > +{ > > +#if defined(XP_WIN) > > +FILE *log_file; > > +gchar *log_filename; > > + > > +if (!g_getenv("SPICE_XPI_LOG_TO_FILE")) > > +return; > > Imho, it

Re: [Spice-devel] [spice-gtk PATCH 0/9] Windows: identify USB devices by vid:pid instead of bus.address

2013-03-25 Thread Hans de Goede
Hi, On 03/25/2013 11:01 AM, Uri Lublin wrote: rhbz#842816 It seems that sometimes a USB device's bus.address is changing after installation of WinUSB driver for that device. So instead use vid:pid which are consistent across driver installation. The switch to using vid:pid is done in patch 8/9

[Spice-devel] [spice-gtk PATCH 9/9] usb-device-manager: fix log messages to match vid:pid change

2013-03-25 Thread Uri Lublin
On Windows clients now USB devices are identified by their vid:pid (sometimes these values are being held by variables "bus" and "addr") Change log messages accordingly. --- gtk/usb-device-manager.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/gtk/usb-devic

[Spice-devel] [spice-gtk PATCH 8/9] usb-device-manager: Windows: identify devices by vid:pid instead of bus.address

2013-03-25 Thread Uri Lublin
rhbz#842816 Sometimes bus.address of a USB device changes upon WinUSB driver installation for that device. This makes bus.address not a good identifier to use when running on Windows machines. Instead this patch makes usb-device-manager, when running on a Windows client, identify devices by their

[Spice-devel] [spice-gtk PATCH 7/9] usb-device-manager: Windows: spice_usb_device_equal_libdev: compare vid:pid

2013-03-25 Thread Uri Lublin
When comparing spice_usb_device with a libusb_device on Windows clients, use vid:pid instead of bus.address It seems that a device bus.address may change when WinUSB driver is being installed. --- gtk/usb-device-manager.c | 21 + 1 file changed, 21 insertions(+) diff --git a/

[Spice-devel] [spice-gtk PATCH 6/9] usb-device-manager: use a function to get vid:pid from a libusb_device

2013-03-25 Thread Uri Lublin
To be reused later. Also implemented a get_device_descriptor function (in case it will be needed in the future). --- gtk/usb-device-manager.c | 58 +++- 1 file changed, 48 insertions(+), 10 deletions(-) diff --git a/gtk/usb-device-manager.c b/gtk/usb-d

[Spice-devel] [spice-gtk PATCH 5/9] usb-device-manager: find_libdev: use a match function

2013-03-25 Thread Uri Lublin
Instead of comparing directly against . In preparation of comparing against vid:pid for Windows clients. --- gtk/usb-device-manager.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c index d58fb72..b4320af 10

[Spice-devel] [spice-gtk PATCH 4/9] usb-device-manager: find_device: use a match function

2013-03-25 Thread Uri Lublin
Instead of comparing directly against In preparation of comparing against vid:pid for Windows clients. --- gtk/usb-device-manager.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c index 4421c48..d58fb72 100644

[Spice-devel] [spice-gtk PATCH 3/9] usb-device-manager: constify spice_usb_device_get_ functions

2013-03-25 Thread Uri Lublin
--- gtk/usb-device-manager-priv.h | 8 gtk/usb-device-manager.c | 16 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gtk/usb-device-manager-priv.h b/gtk/usb-device-manager-priv.h index 51a38df..b6fa9c9 100644 --- a/gtk/usb-device-manager-priv.h +++

[Spice-devel] [spice-gtk PATCH 2/9] win-usb-dev: compare vid:pid instead of bus.addr (Windows)

2013-03-25 Thread Uri Lublin
It seems that sometimes, on Win7 clients, bus.addr is changing when WinUSB driver is being installed (e.g. 4.1 -> 4.2). So compare vid:pid instead. --- gtk/win-usb-dev.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gtk/win-usb-dev.c b/gtk/win-usb-dev.c index 0b

[Spice-devel] [spice-gtk PATCH 1/9] win-usb-dev: make VID and PID available via get_property (Windows)

2013-03-25 Thread Uri Lublin
--- gtk/win-usb-dev.c | 8 1 file changed, 8 insertions(+) diff --git a/gtk/win-usb-dev.c b/gtk/win-usb-dev.c index c188807..0bccc7c 100644 --- a/gtk/win-usb-dev.c +++ b/gtk/win-usb-dev.c @@ -60,6 +60,8 @@ struct _GUdevDeviceInfo { gchar sclass[4]; gchar sbus[4]; gchar sad

[Spice-devel] [spice-gtk PATCH 0/9] Windows: identify USB devices by vid:pid instead of bus.address

2013-03-25 Thread Uri Lublin
rhbz#842816 It seems that sometimes a USB device's bus.address is changing after installation of WinUSB driver for that device. So instead use vid:pid which are consistent across driver installation. The switch to using vid:pid is done in patch 8/9. Some code reuses variables named "bus" and "ad