Fixed urbdrc server notification of channel close
authorArmin Novak <armin.novak@thincast.com>
Mon, 10 Aug 2020 11:30:41 +0000 (13:30 +0200)
committerakallabeth <akallabeth@users.noreply.github.com>
Tue, 1 Dec 2020 14:10:23 +0000 (15:10 +0100)
commit270e741d469134b32139321f12d3c2bc1773fb42
tree0e2ca1815ce41657cb20c2b1659e42455b00d0d8
parent5572eedc578512a1366052b67d28c0eaaa6ef1e0
Fixed urbdrc server notification of channel close

There was a recursion issue with usb device channel closing and
local redirected device removal.
If the local redirected device is removed due to hotplug events,
the device channel needs to be closed, which in turn checks if
the local device list contains the device. Ensure that the
channel close code is only executed when not called from the
channel side.

(cherry picked from commit 93ee13245ce7fe78ffbc9694bfac3da30844296a)
channels/urbdrc/client/libusb/libusb_udevice.c
channels/urbdrc/client/libusb/libusb_udevman.c
channels/urbdrc/client/urbdrc_main.c
channels/urbdrc/client/urbdrc_main.h