mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user