Merge pull request #2909 from akallabeth/clipboard_remove_copy
Speedup for clipboard
This commit is contained in:
commit
6d810a5d78
@ -306,20 +306,11 @@ UINT cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, wStream* s, UI
|
|||||||
formatDataResponse.requestedFormatData = NULL;
|
formatDataResponse.requestedFormatData = NULL;
|
||||||
|
|
||||||
if (dataLen)
|
if (dataLen)
|
||||||
{
|
formatDataResponse.requestedFormatData = (BYTE*) Stream_Pointer(s);
|
||||||
formatDataResponse.requestedFormatData = (BYTE*) malloc(dataLen);
|
|
||||||
if (!formatDataResponse.requestedFormatData)
|
|
||||||
{
|
|
||||||
WLog_ERR(TAG, "malloc failed!");
|
|
||||||
return CHANNEL_RC_NO_MEMORY;
|
|
||||||
}
|
|
||||||
Stream_Read(s, formatDataResponse.requestedFormatData, dataLen);
|
|
||||||
}
|
|
||||||
|
|
||||||
IFCALLRET(context->ServerFormatDataResponse, error, context, &formatDataResponse);
|
IFCALLRET(context->ServerFormatDataResponse, error, context, &formatDataResponse);
|
||||||
if (error)
|
if (error)
|
||||||
WLog_ERR(TAG, "ServerFormatDataResponse failed with error %lu!", error);
|
WLog_ERR(TAG, "ServerFormatDataResponse failed with error %lu!", error);
|
||||||
|
|
||||||
free(formatDataResponse.requestedFormatData);
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user