Skip to content

Validate ONVIF discovered endpoints and subscription slot reuse - #983

Merged
matteius merged 2 commits into
mainfrom
ai-findings-autofix/src-video-onvif_detection.c
Nov 19, 2026
Merged

matteius merged 2 commits into
mainfrom
ai-findings-autofix/src-video-onvif_detection.c

Conversation

@matteius

@matteius matteius commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Review changes

  • Reuse the existing CURLU based scheme, host, and port validation before sending credentials to a discovered event endpoint. Camera-local alternate ports remain supported.
  • Hold the subscription slot lock through cleanup and replacement so polling cannot observe a reset slot.
  • Add a transport test proving an advertised endpoint on another host is never contacted.

The original autofix used string slicing for URL comparison and reset the slot without its lock. This revision replaces those changes and drops generated Rust churn; CI regenerates Rust from C.

Verification

  • test_onvif_transport passes locally.

@matteius
matteius force-pushed the ai-findings-autofix/src-video-onvif_detection.c branch from b9d2039 to e5d11a6 Compare November 19, 2026 04:01
@matteius matteius changed the title Potential fixes for 2 code quality findings Validate ONVIF discovered endpoints and subscription slot reuse Nov 19, 2026
@matteius
matteius marked this pull request as ready for review November 19, 2026 04:01
@matteius
matteius merged commit db0f079 into main Nov 19, 2026
6 of 12 checks passed
@matteius
matteius deleted the ai-findings-autofix/src-video-onvif_detection.c branch November 19, 2026 04:11
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/video/onvif_detection.c 0.00% 15 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant