mirror of https://github.com/FreeRDP/FreeRDP
Fixed invalid buffer length and duplicated write function.
This commit is contained in:
parent
e7533130a6
commit
54c92e78e6
|
@ -763,9 +763,7 @@ static void urb_isoch_transfer_cb(IUDEVICE* pdev, URBDRC_CHANNEL_CALLBACK* callb
|
|||
Stream_Write_UINT32(out, OutputBufferSize); /** OutputBufferSize */
|
||||
Stream_Seek(out, OutputBufferSize);
|
||||
|
||||
if (!pdev->isChannelClosed(pdev))
|
||||
callback->channel->Write(callback->channel, Stream_GetPosition(out), Stream_Buffer(out),
|
||||
NULL);
|
||||
stream_write_and_free(callback->plugin, callback->channel, out);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -923,7 +923,10 @@ static int libusb_udev_os_feature_descriptor_request(IUDEVICE* idev, UINT32 Requ
|
|||
LIBUSB_ENDPOINT_IN | LIBUSB_REQUEST_TYPE_VENDOR | Recipient,
|
||||
bMS_Vendorcode, (InterfaceNumber << 8) | Ms_PageIndex,
|
||||
Ms_featureDescIndex, Buffer, *BufferSize, Timeout);
|
||||
*BufferSize = error;
|
||||
log_libusb_result(pdev->urbdrc->log, WLOG_DEBUG, "libusb_control_transfer", error);
|
||||
|
||||
if (error >= 0)
|
||||
*BufferSize = error;
|
||||
}
|
||||
|
||||
if (error < 0)
|
||||
|
|
|
@ -391,7 +391,7 @@ void urbdrc_dump_message(wLog* log, BOOL client, BOOL write, wStream* s)
|
|||
pos = Stream_GetPosition(s);
|
||||
if (write)
|
||||
{
|
||||
length = Stream_GetPosition(s);
|
||||
length = pos;
|
||||
Stream_SetPosition(s, 0);
|
||||
}
|
||||
else
|
||||
|
@ -407,7 +407,7 @@ void urbdrc_dump_message(wLog* log, BOOL client, BOOL write, wStream* s)
|
|||
|
||||
WLog_Print(log, WLOG_DEBUG,
|
||||
"[%-5s] %s [%08" PRIx32 "] InterfaceId=%08" PRIx32 ", MessageId=%08" PRIx32
|
||||
", FunctionId=%08" PRIx32 ", length=%" PRIdz,
|
||||
", FunctionId=%08" PRIx32 ", length=%" PRIuz,
|
||||
type, call_to_string(client, InterfaceId, FunctionId), FunctionId, InterfaceId,
|
||||
MessageId, FunctionId, length);
|
||||
#if defined(WITH_DEBUG_URBDRC)
|
||||
|
|
Loading…
Reference in New Issue