Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block fw update to pre minimal versions using LRS API #13583

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/rs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3568,6 +3568,10 @@ void rs2_update_firmware_unsigned_cpp( const rs2_device * device,

std::vector<uint8_t> buffer((uint8_t*)image, (uint8_t*)image + image_size);

if(!fwud->check_fw_compatibility(buffer))
throw std::runtime_error( std::string( "The firmware version is not compatible with " )
+ device->device->get_info( RS2_CAMERA_INFO_NAME ) );

fwud->update_flash( buffer, callback_ptr, update_mode );
}
HANDLE_EXCEPTIONS_AND_RETURN(, image, device)
Expand All @@ -3583,6 +3587,10 @@ void rs2_update_firmware_unsigned(const rs2_device* device, const void* image, i

std::vector<uint8_t> buffer((uint8_t*)image, (uint8_t*)image + image_size);

if(!fwud->check_fw_compatibility( buffer ))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you verify that an unsigned image does contain the version in the image?

throw std::runtime_error( std::string( "The firmware version is not compatible with " )
+ device->device->get_info( RS2_CAMERA_INFO_NAME ) );

if (callback == NULL)
fwud->update_flash(buffer, nullptr, update_mode);
else
Expand Down
Loading