When attempting to redirect a device and the <device id> input string doesn't
match the actual <device id> string (case sensitive) the UsbDkController gets
stuck for two minutes and the error: "Redirect of USB device failed" is shown.
This is caused by case insensitive comparison between the input string and the
<device id> string in "CRegText::Match(PCWSTR String)" followed by case
sensitive comparison in "CStringBase::operator== (const UNICODE_STRING& Str)"
causing the "m_RedirectionCreated" event's timeout - two minutes - to expire.
This commit makes the error message show instantly eliminating the two
minutes delay.
<device id> string comparison should be case sensitive as defined
by user mode UsbDk API contract.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
This makes include policy more strict and ensures
all system includes properly wrapped with extern "C"
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
MatchPrefix() checks whether given string is a prefix
of at least one string held by CRegText object
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>