multi: split multi_runsingle into sub functions#20573
Conversation
To reduce complexity. - is_finished() checks if the individual transfer is done - handle_completed() is the logic that runs for a completed transfer
There was a problem hiding this comment.
Pull request overview
This PR refactors multi_runsingle() in lib/multi.c by extracting completion/error-handling logic into dedicated helper functions to reduce complexity and improve readability.
Changes:
- Extracted end-of-loop completion/error transition logic into
is_finished() - Extracted completed-transfer message/callback handling into
handle_completed() - Simplified
multi_runsingle()by replacing large inline blocks with helper calls
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
augment review |
🤖 Augment PR SummarySummary: This PR refactors the multi interface transfer state machine to reduce complexity in Changes:
Technical Notes: The refactor keeps the same completion path: errors can force 🤖 Was this summary useful? React with 👍 or 👎 |
|
The fuzzer build now reports: 2026-02-12 16:06:59,118 - root - INFO - Base OS version is Ubuntu 24.04, but running in a different OS. Pivoting to Ubuntu 24.04 container. docker: Error response from daemon: client version 1.41 is too old. Minimum supported API version is 1.44, please upgrade your client to a newer version. |
To reduce complexity.
is_finished() checks if the individual transfer is done
handle_completed() is the logic that runs for a completed transfer