summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Fleytman <dfleytma@redhat.com>2017-01-31 15:43:47 +0200
committerDmitry Fleytman <dfleytma@redhat.com>2017-01-31 15:43:47 +0200
commitbb931eade4d9fbf46a75f0d6a251843209f31dd3 (patch)
treed760680192b87a279ce9ef497a1f683c6f71ba79
parent4ae38672d48e37ac667bbecace44473b51c547c4 (diff)
ControlDevice: Add more traces for redirection set modifications
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
-rw-r--r--UsbDk/ControlDevice.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/UsbDk/ControlDevice.cpp b/UsbDk/ControlDevice.cpp
index c686ddc..3e42d56 100644
--- a/UsbDk/ControlDevice.cpp
+++ b/UsbDk/ControlDevice.cpp
@@ -911,6 +911,9 @@ NTSTATUS CUsbDkControlDevice::AddRedirectionToSet(const USB_DK_DEVICE_ID &Device
return status;
}
+ TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_CONTROLDEVICE, "%!FUNC! Adding new redirection");
+ newRedir->Dump();
+
if (!UsbDeviceExists(DeviceId))
{
TraceEvents(TRACE_LEVEL_ERROR, TRACE_CONTROLDEVICE, "%!FUNC! failed. Cannot redirect unknown device.");
@@ -935,11 +938,19 @@ NTSTATUS CUsbDkControlDevice::RemoveRedirect(const USB_DK_DEVICE_ID &DeviceId)
auto res = ResetUsbDevice(DeviceId);
if (NT_SUCCESS(res))
{
+ TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_CONTROLDEVICE,
+ "%!FUNC! Waiting for detachment from %S:%S",
+ DeviceId.DeviceID, DeviceId.InstanceID);
+
if (!WaitForDetachment(DeviceId))
{
TraceEvents(TRACE_LEVEL_ERROR, TRACE_CONTROLDEVICE, "%!FUNC! Wait for redirector detachment failed.");
return STATUS_DEVICE_NOT_CONNECTED;
}
+
+ TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_CONTROLDEVICE,
+ "%!FUNC! Detached from %S:%S",
+ DeviceId.DeviceID, DeviceId.InstanceID);
}
else if (res != STATUS_NO_SUCH_DEVICE)
{
@@ -959,7 +970,10 @@ NTSTATUS CUsbDkControlDevice::RemoveRedirect(const USB_DK_DEVICE_ID &DeviceId)
return STATUS_SUCCESS;
}
- TraceEvents(TRACE_LEVEL_ERROR, TRACE_CONTROLDEVICE, "%!FUNC! failed.");
+ TraceEvents(TRACE_LEVEL_ERROR, TRACE_CONTROLDEVICE,
+ "%!FUNC! failed for %S:%S",
+ DeviceId.DeviceID, DeviceId.InstanceID);
+
return STATUS_OBJECT_NAME_NOT_FOUND;
}