UsbDkHelper: Fix read/write logic
Do not destroy redirector handle after each operation. Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
This commit is contained in:
parent
1447b8d476
commit
008699089f
1 changed files with 2 additions and 2 deletions
|
|
@ -221,7 +221,7 @@ BOOL WritePipe(HANDLE DeviceHandle, PUSB_DK_TRANSFER_REQUEST Request, PULONG Byt
|
|||
{
|
||||
try
|
||||
{
|
||||
unique_ptr<REDIRECTED_DEVICE_HANDLE> deviceHandle(reinterpret_cast<PREDIRECTED_DEVICE_HANDLE>(DeviceHandle));
|
||||
auto deviceHandle = reinterpret_cast<PREDIRECTED_DEVICE_HANDLE>(DeviceHandle);
|
||||
deviceHandle->RedirectorAccess->WritePipe(*Request, *BytesWritten);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
@ -237,7 +237,7 @@ BOOL ReadPipe(HANDLE DeviceHandle, PUSB_DK_TRANSFER_REQUEST Request, PULONG Byte
|
|||
{
|
||||
try
|
||||
{
|
||||
unique_ptr<REDIRECTED_DEVICE_HANDLE> deviceHandle(reinterpret_cast<PREDIRECTED_DEVICE_HANDLE>(DeviceHandle));
|
||||
auto deviceHandle= reinterpret_cast<PREDIRECTED_DEVICE_HANDLE>(DeviceHandle);
|
||||
deviceHandle->RedirectorAccess->ReadPipe(*Request, *BytesRead);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue