fix(fcc): support huawei short response with double sockets#470
Conversation
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-470.eastasia.1.azurestaticapps.net |
b1c7d97 to
ab69002
Compare
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-470.eastasia.1.azurestaticapps.net |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab69002775
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR extends the FCC (Fast Channel Change) implementation to better support Huawei-specific behaviors by introducing a dedicated Huawei media socket (paired with the signaling socket) and by correctly handling Huawei “short” (24-byte) FCC responses that omit NAT traversal fields.
Changes:
- Add Huawei-only dual-socket support (adjacent media/signaling UDP ports) while keeping other FCC types on the single-socket path.
- Update FCC event handling to drain/process packets from either the signaling or media socket.
- Expand E2E coverage for Huawei short responses and redirect flows, and for Telecom redirect duplicates / signal-port changes.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/stream.c | Routes events for both FCC signaling socket and (new) Huawei media socket into FCC handling. |
| src/fcc.h | Extends FCC session state with Huawei media socket/client address fields and updates handler signature. |
| src/fcc.c | Implements dual-socket creation/binding/registration and refactors bind logic into reusable helpers. |
| src/fcc_telecom.c | Ignores duplicate redirect responses without consuming redirect budget. |
| src/fcc_huawei.c | Supports Huawei short (24-byte) responses, improves response logging, and ignores duplicate redirects. |
| e2e/test_fcc.py | Adds E2E tests covering Huawei short responses, redirect→short, and Telecom redirect duplicate handling. |
| e2e/helpers/mock_fcc.py | Enhances MockFCCServer to emit short Huawei responses, redirect responses, and adjusted Huawei unicast send port behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ab69002 to
e4d101c
Compare
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://thankful-water-0a297bf00-470.eastasia.1.azurestaticapps.net |
Summary
This PR adds Huawei-specific FCC double socket support and handles Huawei short FCC responses that do not include NAT traversal fields.
What changed
N, signaling portN + 1.FMT=6/type=2short responses with 24 bytes by parsingfirst_seqand bitrate, then waiting for unicast instead of falling back to multicast.Validation
git diff --checkcmake --build build -j$(getconf _NPROCESSORS_ONLN) | tail -100./scripts/run-e2e.sh test_fcc.py -p 1 | tail -120