-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix FW logs bug. #12853
Fix FW logs bug. #12853
Conversation
{ | ||
fwlogger.stop_collecting(); | ||
|
||
if( !enable_firmware_logs && fwlogger.get_number_of_fw_logs() == 0 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand from the code, before if the user deactivate the log parsing, we continues dequeue until get_number_of_fw_logs() == 0
Now we will stop even we still have logs as our loop is while( enable_firmware_logs )
Is this change the required behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Get logs" HWM can return multiple log entries at once. Those entries are put in a queue. Subsequent calls to get_firmware_log
don't send HWM, only deque the messages.
get_number_of_fw_logs() == 0
when the queue is empty, then we break the loop and call stop_collecting
src/firmware_logger_device.cpp
Outdated
|
||
void firmware_logger_device::HandleReceivedData( std::vector< uint8_t > & res ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added, and naming convention fixed
Did not parse messages returned for the "start" HWMC, only parsed for the "update" HWMC.
Also the viewer parse the XML repeatedly, changed to parse only once when starting.