[channels,rdpdr] fix IRP handling

* clean up IRP creation
* Properly handle each IRP, call irp->Complete or irp->Discard only once
  for each IRP
* For each channel split IRP handling, one function prepares the data
  and a single evaluate function later calls irp->Complete or irp->Discard
This commit is contained in:
Armin Novak
2026-02-17 14:11:46 +01:00
parent 66d84e7f45
commit 5f10ae9599
7 changed files with 134 additions and 128 deletions

View File

@@ -596,11 +596,15 @@ static UINT smartcard_irp_request(DEVICE* device, IRP* irp)
SMARTCARD_DEVICE* smartcard = CAST_FROM_DEVICE(device);
if (!smartcard)
{
irp->Discard(irp);
return ERROR_INVALID_PARAMETER;
}
if (!MessageQueue_Post(smartcard->IrpQueue, NULL, 0, (void*)irp, NULL))
{
WLog_ERR(TAG, "MessageQueue_Post failed!");
irp->Discard(irp);
return ERROR_INTERNAL_ERROR;
}