Skip to content

Commit dddc046

Browse files
Sameeh JubranDmitry Fleytman
Sameeh Jubran
authored and
Dmitry Fleytman
committed
UsbDk: Use case sensitive comparison
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 <[email protected]> Signed-off-by: Dmitry Fleytman <[email protected]>
1 parent 1217ff2 commit dddc046

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

UsbDk/RegText.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ bool CRegText::Match(PCWSTR String) const
4949
{
5050
for (auto idData : *this)
5151
{
52-
if (!_wcsicmp(idData, String))
52+
if (!wcscmp(idData, String))
5353
{
5454
return true;
5555
}

0 commit comments

Comments
 (0)