Fix an IPC protocol issue on windows when receiving zero HANDLEs

This commit is contained in:
Julian Petrov 2022-10-13 20:50:49 -04:00
parent d0f713c4c4
commit fb28f940b5

View file

@ -85,7 +85,7 @@ ipc_receive_fds(
struct ipc_message_channel *imc, void *out_data, size_t size, HANDLE *out_handles, uint32_t handle_count)
{
auto rc = ipc_receive(imc, out_data, size);
if (rc != XRT_SUCCESS || !handle_count) {
if (rc != XRT_SUCCESS) {
return rc;
}
return ipc_receive(imc, out_handles, handle_count * sizeof(*out_handles));