Repository navigation
Gate SW/FW update checking on CHECK_FOR_UPDATES independent of BUILD_WITH_LIBCURL - #15682
Conversation
…WITH_LIBCURL Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
sysrsbuild-gh-agentic
left a comment
There was a problem hiding this comment.
Auto-generated review by rs-agentic bot
The fix correctly restores CHECK_FOR_UPDATES as the sole gate for update-check network traffic. Two minor points inline.
| #ifndef CHECK_FOR_UPDATES | ||
| // BUILD_WITH_LIBCURL (and therefore the http_downloader this relies on) may still be on | ||
| // because of ENABLE_STATS; this flag stays the sole on/off switch for update checking. | ||
| return; |
There was a problem hiding this comment.
[rs-agentic bot] activated_by_user == true (user manually triggered the check via UI), this silent return gives no feedback. The caller may be expecting a result or UI update. Consider logging a debug message (e.g. LOG_DEBUG("Update check skipped: CHECK_FOR_UPDATES is OFF")) so it's diagnosable, and verify the call site handles a no-op gracefully without leaving the UI in a stale state.
There was a problem hiding this comment.
change approved
There was a problem hiding this comment.
✅ Fixed in 69c87b2. Moved the guard to the call sites instead: both the automatic check in refresh_notifications() and the manual "Check For Updates" menu item are now wrapped in #ifdef CHECK_FOR_UPDATES. The menu item no longer exists when the flag is off, so there's nothing left to trigger the no-op.
🤖 Generated by AI
…he function Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… early return Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Overview: Restores
CHECK_FOR_UPDATESas the sole switch for the SW/FW update-check feature, so setting it OFF actually disables update checking again.Tracked on [RSDSO-21555]
Why
PR #15249 (RUM Phase 1) refactored the shared HTTP layer used by both the SW/FW update-checker and the new RUM stats uploader. The old
common/sw-update/http-downloader.cpphad its own#ifdef CHECK_FOR_UPDATESguard that made it a no-op when the flag was off. The replacementcommon/http/http-downloader.cpphas no such guard — it always forwards tocurl_wrapper, which only becomes a no-op whenBUILD_WITH_LIBCURLis undefined. SinceBUILD_WITH_LIBCURLis defined wheneverCHECK_FOR_UPDATES OR ENABLE_STATSis on, andENABLE_STATSdefaults toON, the update-checker kept making real network calls even with-DCHECK_FOR_UPDATES=OFF.Summary
device_model::check_for_device_updates()now returns immediately whenCHECK_FOR_UPDATESisn't defined, before any network work. The "Check For Updates" context-menu item is left as-is (unreachable network call becomes a no-op, matching its pre-existing behavior when the flag is off).Test plan
realsense-viewer(Release,CHECK_FOR_UPDATES=ON,ENABLE_STATS=ON) — compiles and links cleanly, existing behavior unchanged.ENABLE_STATS=ON/CHECK_FOR_UPDATES=OFF— update checking correctly disabled.ENABLE_STATS=ON/CHECK_FOR_UPDATES=ON— update checking works as expected.🤖 Generated with Claude Code