mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
Add missing memory registration case
This commit is contained in:
parent
53a5456d8c
commit
11a3a41a0f
|
@ -434,11 +434,21 @@ auto Socket::RecvControlQueueReader() -> void
|
||||||
auto ctrl = MakeControlMessageWithPmr<PostBuffer>(&fControlMemPool);
|
auto ctrl = MakeControlMessageWithPmr<PostBuffer>(&fControlMemPool);
|
||||||
auto ctrl_msg = boost::asio::mutable_buffer(ctrl.get(), sizeof(PostBuffer));
|
auto ctrl_msg = boost::asio::mutable_buffer(ctrl.get(), sizeof(PostBuffer));
|
||||||
|
|
||||||
|
if (fNeedOfiMemoryRegistration) {
|
||||||
|
asiofi::memory_region mr(*fOfiDomain, ctrl_msg, asiofi::mr::access::recv);
|
||||||
|
auto desc = mr.desc();
|
||||||
|
|
||||||
|
fControlEndpoint->recv(
|
||||||
|
ctrl_msg, desc, [&, ctrl2 = std::move(ctrl), mr2 = std::move(mr)](boost::asio::mutable_buffer) mutable {
|
||||||
|
OnRecvControl(std::move(ctrl2));
|
||||||
|
});
|
||||||
|
} else {
|
||||||
fControlEndpoint->recv(
|
fControlEndpoint->recv(
|
||||||
ctrl_msg, [&, ctrl2 = std::move(ctrl)](boost::asio::mutable_buffer) mutable {
|
ctrl_msg, [&, ctrl2 = std::move(ctrl)](boost::asio::mutable_buffer) mutable {
|
||||||
OnRecvControl(std::move(ctrl2));
|
OnRecvControl(std::move(ctrl2));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user