[virt-tools-list] [PATCH] spice: vv-file: do not ignore usb-filter
Fabiano Fidêncio
fidencio at redhat.com
Thu Feb 18 11:56:43 UTC 2016
Uri,
On Thu, Feb 18, 2016 at 12:44 PM, Uri Lublin <uril at redhat.com> wrote:
> Fixes rhbz#1309634
>
> Signed-off-by: Uri Lublin <uril at redhat.com>
> ---
> src/virt-viewer-session-spice.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
> index b9cae5e..d93edff 100644
> --- a/src/virt-viewer-session-spice.c
> +++ b/src/virt-viewer-session-spice.c
> @@ -586,6 +586,16 @@ fill_session(VirtViewerFile *file, SpiceSession *session)
> g_object_set(G_OBJECT(gtk), "auto-usbredir", enabled, NULL);
> }
>
> + if (virt_viewer_file_is_set(file, "usb-filter")) {
> + gchar *filterstr = virt_viewer_file_get_usb_filter(file);
> + SpiceUsbDeviceManager *manager = spice_usb_device_manager_get(session,
> + NULL);
> + if (manager) {
I'd prefer a explicit check for NULL here.
You don't need to re-send a v2, just le me know if I can add this
before pushing.
> + g_object_set(manager, "auto-connect-filter", filterstr, NULL);
> + }
> + g_free(filterstr);
> + }
> +
> if (virt_viewer_file_is_set(file, "secure-channels")) {
> gchar **channels = virt_viewer_file_get_secure_channels(file, NULL);
> g_object_set(G_OBJECT(session), "secure-channels", channels, NULL);
> --
> 2.5.0
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
Reviewed-by: Fabiano Fidêncio <fidencio at redhat.com>
More information about the virt-tools-list
mailing list