[Spice-devel] [PATCH usbredir v3] usbredirserver: reject empty vendorid in cmd line

2017-11-28 Thread Chen Hanxiao
From: Chen Hanxiao Vendor ID is not a valid ID [1] But we could pass it from cmd: usbredirserver :abcd Which will get a vendor ID. or usbredirserver :87abcd will get an ID > 0x This patch will check this senario. [1]: http://www.linux-usb.org/usb.ids Signed-off

Re: [Spice-devel] [PATCH usbredir v2.1] usbredirserver: reject empty vendorid in cmd line

2017-11-28 Thread Chen Hanxiao
At 2017-11-28 21:16:15, "Frediano Ziglio" wrote: >> >> From: Chen Hanxiao >> >> Vendor ID is not a valid ID [1] >> But we could pass it from cmd: >> usbredirserver :abcd >> Which will cause a vendor id. >> >>

[Spice-devel] [PATCH usbredir v2.1] usbredirserver: reject empty vendorid in cmd line

2017-11-28 Thread Chen Hanxiao
From: Chen Hanxiao Vendor ID is not a valid ID [1] But we could pass it from cmd: usbredirserver :abcd Which will cause a vendor id. This patch will check this senario. [1]: http://www.linux-usb.org/usb.ids Signed-off-by: Chen Hanxiao --- v2.1: fix a copy-paste error v2: add

Re: [Spice-devel] [PATCH usbredir v2] usbredirserver: reject empty vendorid in cmd line

2017-11-28 Thread Chen Hanxiao
At 2017-11-28 19:38:10, "Frediano Ziglio" wrote: >> >> From: Chen Hanxiao >> >> Vendor ID is not a valid ID [1] >> But we could pass it from cmd: >> usbredirserver :abcd >> Which will cause a vendor id. >> Also check th

[Spice-devel] [PATCH usbredir v2] usbredirserver: reject empty vendorid in cmd line

2017-11-28 Thread Chen Hanxiao
From: Chen Hanxiao Vendor ID is not a valid ID [1] But we could pass it from cmd: usbredirserver :abcd Which will cause a vendor id. Also check the range of them. This patch will check this senario. [1]: http://www.linux-usb.org/usb.ids Signed-off-by: Chen Hanxiao --- v2: add

Re: [Spice-devel] [PATCH usbredir] usbredirserver: reject empty vendor id in cmd line

2017-11-28 Thread Chen Hanxiao
At 2017-11-28 19:11:23, "Frediano Ziglio" wrote: >> >> At 2017-11-28 18:49:54, "Frediano Ziglio" wrote: >> >> >> >> At 2017-11-28 18:27:54, "Frediano Ziglio" wrote: >> >> >> >> >> >> Fro

Re: [Spice-devel] [PATCH usbredir] usbredirserver: reject empty vendor id in cmd line

2017-11-28 Thread Chen Hanxiao
At 2017-11-28 18:49:54, "Frediano Ziglio" wrote: >> >> At 2017-11-28 18:27:54, "Frediano Ziglio" wrote: >> >> >> >> From: Chen Hanxiao >> >> >> >> Vendor ID is not a valid ID [1] >> >> But we

Re: [Spice-devel] [PATCH usbredir] usbredirserver: reject empty vendor id in cmd line

2017-11-28 Thread Chen Hanxiao
At 2017-11-28 18:27:54, "Frediano Ziglio" wrote: >> >> From: Chen Hanxiao >> >> Vendor ID is not a valid ID [1] >> But we could pass it from cmd: >> usbredirserver :abcd >>or >> usbredirserver :abcd >> >>

[Spice-devel] [PATCH usbredir] usbredirserver: reject empty vendor id in cmd line

2017-11-28 Thread Chen Hanxiao
From: Chen Hanxiao Vendor ID is not a valid ID [1] But we could pass it from cmd: usbredirserver :abcd or usbredirserver :abcd Which will pass a vendor id to usbredirserver. This patch will check this senario. [1]: http://www.linux-usb.org/usb.ids Signed-off-by: Chen

[Spice-devel] [PATCH usbredir v2] usbredirserver: don't show logs after a failure open

2017-11-27 Thread Chen Hanxiao
From: Chen Hanxiao If we did't open a USB device successfully, don't try to show that USB device info logs. Signed-off-by: Chen Hanxiao --- v2: modified the wrong title usbredirserver/usbredirserver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usbr

Re: [Spice-devel] [PATCH usbredir] usbredirtestclient: don't show device info after a failure open

2017-11-27 Thread Chen Hanxiao
At 2017-11-28 15:10:10, "Chen Hanxiao" wrote: >From: Chen Hanxiao > >If we don't open a USB device successfully, >don't try to show device info logs. > >Signed-off-by: Chen Hanxiao >--- > usbredirserver/usbredirserver.c | 3 +-- > 1 file changed,

[Spice-devel] [PATCH usbredir] usbredirtestclient: don't show device info after a failure open

2017-11-27 Thread Chen Hanxiao
From: Chen Hanxiao If we don't open a USB device successfully, don't try to show device info logs. Signed-off-by: Chen Hanxiao --- usbredirserver/usbredirserver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usbredirserver/usbredirserver.c b/usbr

[Spice-devel] [PATCH usbredir v3] usbredirserver: show bus:device of the USB device if specifying vid:pid

2017-11-23 Thread Chen Hanxiao
From: Chen Hanxiao We use libusb_open_device_with_vid_pid, if multiple devices have the same vid:pid, it will only the first one. This patch will show the bus:device of the chosen one. Signed-off-by: Chen Hanxiao --- v3: move dev declaration inside if v2: control output messages by verbose

Re: [Spice-devel] [PATCH usbredir v2] usbredirserver: show bus:device of the USB device if specifying vid:pid

2017-11-23 Thread Chen Hanxiao
At 2017-11-23 19:28:42, "Frediano Ziglio" wrote: >> >> From: Chen Hanxiao >> >> We use libusb_open_device_with_vid_pid, if multiple devices >> have the same vid:pid, it will only the first one. >> >> This patch will show the bus:device o

[Spice-devel] [PATCH usbredir v2] usbredirserver: show bus:device of the USB device if specifying vid:pid

2017-11-21 Thread Chen Hanxiao
From: Chen Hanxiao We use libusb_open_device_with_vid_pid, if multiple devices have the same vid:pid, it will only the first one. This patch will show the bus:device of the chosen one. Signed-off-by: Chen Hanxiao --- v2: control output messages by verbose usbredirserver/usbredirserver.c | 9

[Spice-devel] [PATCH usbredir] usbredirtestclient: fix a wrong comment

2017-11-20 Thread Chen Hanxiao
From: Chen Hanxiao usbredirparser_info is 3. Signed-off-by: Chen Hanxiao --- usbredirtestclient/usbredirtestclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usbredirtestclient/usbredirtestclient.c b/usbredirtestclient/usbredirtestclient.c index 2437a1f..3e63909

Re: [Spice-devel] [PATCH usbredir] usbredirserver: show bus:device of the chosen USB device if specifying vid:pid

2017-11-20 Thread Chen Hanxiao
At 2017-11-20 22:01:26, "Frediano Ziglio" wrote: >> >> From: Chen Hanxiao >> >> We use libusb_open_device_with_vid_pid. >> If multiple devices have the same vid:pid, >> it will only return the first one. >> >> This patch will show th

[Spice-devel] [PATCH usbredir] usbredirserver: show bus:device of the chosen USB device if specifying vid:pid

2017-11-18 Thread Chen Hanxiao
From: Chen Hanxiao We use libusb_open_device_with_vid_pid. If multiple devices have the same vid:pid, it will only return the first one. This patch will show the bus:device of the chosen one. Signed-off-by: Chen Hanxiao --- usbredirserver/usbredirserver.c | 7 +++ 1 file changed, 7

[Spice-devel] [PATCH] usb-redirection-protocol: fix some typos

2017-11-17 Thread Chen Hanxiao
From: Chen Hanxiao s/deamon/daemon s/respone/response Signed-off-by: Chen Hanxiao --- usb-redirection-protocol.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usb-redirection-protocol.txt b/usb-redirection-protocol.txt index 1022dc8..ff94f0f 100644 --- a/usb

[Spice-devel] [PATCH v3] usbredirserver: add support for bind specific address

2017-11-17 Thread Chen Hanxiao
From: Chen Hanxiao We bind our listen address to in6addr_any, which may be unsecure with multi network cards that belong to internal or external networks. This patch introduces option -4 and -6 to bind a specific address. Reviewed-by: Marc-André Lureau Signed-off-by: Chen Hanxiao --- v3

Re: [Spice-devel] [PATCH v2] usbredirserver: add support for bind specific address

2017-11-17 Thread Chen Hanxiao
At 2017-11-17 19:23:30, "Frediano Ziglio" wrote: >> >> From: Chen Hanxiao >> >> We bind our listen address to in6addr_any, which may be >> unsecure with multi network cards that belong to >> internal or external networks. >> >>

[Spice-devel] [PATCH v2] usbredirserver: add support for bind specific address

2017-11-17 Thread Chen Hanxiao
From: Chen Hanxiao We bind our listen address to in6addr_any, which may be unsecure with multi network cards that belong to internal or external networks. This patch introduces option -4 and -6 to bind a specific address. Signed-off-by: Chen Hanxiao --- v2: replace strerror with perror

Re: [Spice-devel] [PATCH] usbredirserver: add support for bind specific address

2017-11-17 Thread Chen Hanxiao
At 2017-11-17 16:06:13, "Marc-André Lureau" wrote: >Hi > >- Original Message - >> From: Chen Hanxiao >> >> We bind our listen address to in6addr_any, which may be >> unsecure with multi network cards that belong to >> internal or exter

[Spice-devel] [PATCH] usbredirserver: add support for bind specific address

2017-11-16 Thread Chen Hanxiao
From: Chen Hanxiao We bind our listen address to in6addr_any, which may be unsecure with multi network cards that belong to internal or external networks. This patch introduces option -4 and -6 to bind a specific address. Signed-off-by: Chen Hanxiao --- usbredirserver/usbredirserver.1 | 3

[Spice-devel] [PATCH] usbredirserver: use more popular name instead of usbbus-usbaddr

2017-11-10 Thread Chen Hanxiao
From: Chen Hanxiao Usually we use busnum:devnum for a usb device. Tools such as lsusb, udev did that. Our original naming is a little confued. Signed-off-by: Chen Hanxiao --- usbredirserver/usbredirserver.1 | 2 +- usbredirserver/usbredirserver.c | 6 +++--- 2 files changed, 4