mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-11 05:33:34 +08:00
BasicFileServer::handleRead() error handling fix
This commit is contained in:
@@ -136,6 +136,11 @@ class BasicFileServer
|
||||
|
||||
resp.error.value = backend_.read(req.path.path, req.offset, resp.data.begin(), inout_size);
|
||||
|
||||
if (resp.error.value != protocol::file::Error::OK)
|
||||
{
|
||||
inout_size = 0;
|
||||
}
|
||||
|
||||
if (inout_size > resp.data.capacity())
|
||||
{
|
||||
UAVCAN_ASSERT(0);
|
||||
|
||||
Reference in New Issue
Block a user