Commit graph

7 commits

Author SHA1 Message Date
Sameeh Jubran
dddc046940 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 <sameeh@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2017-03-14 12:40:26 +02:00
Dmitry Fleytman
d5d51dfd47 UsbDk: place all system includes into stdafx.h
This makes include policy more strict and ensures
all system includes properly wrapped with extern "C"

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-06-09 11:50:26 +03:00
Pavel Gurvich
a77d8161e4 UsbDk: Add license-related files and headers
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-20 11:56:20 +03:00
Dmitry Fleytman
55a29f05ea UsbDk: Make CRegText treat nullptr as empty string
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:14 +03:00
Dmitry Fleytman
c98b49296a UsbDk: Introduce CRegText:MatchPrefix() method
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>
2014-05-11 19:26:12 +03:00
Dmitry Fleytman
d6162329ed UsbDk: Make CRegText methods const as needed
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
b293755823 UsbDk: Introduce CRegText classes
Classes for handling REG_SZ/REG_MULTI_SZ data buffers

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:09 +03:00