INT-10169: Cherry-pick upstream pjproject fixes (PR #5033, #5037) - #16
Merged
darshan-verkada merged 2 commits intoJun 25, 2026
Merged
Conversation
When a REGISTER over a connection-oriented transport (TCP/TLS) times out with no response, the underlying connection may have been silently dropped by the peer or an intermediary (NAT/firewall keeping no notification). The transport is still cached and considered usable, so pjsua keeps reusing the dead connection for subsequent (auto-)re-registrations and they keep timing out, leaving the account unregistered for a long time. Detect this case in the registration callback (status 408 / transaction Timer B/F) and, for reliable transports only, shut the transport down so a fresh connection is established on the next registration attempt.
SockOpt::optVal points at the object's own optValInt member (set via setOptValInt()). The compiler-generated copy operations do a shallow copy, so a copied SockOpt's optVal still points into the *source* object's optValInt. Since SockOpt is stored by value in SockOptVector (std::vector<SockOpt>), routine vector operations (growth, element copies, temporaries) leave optVal aliasing memory that is freed once the source object is destroyed. Add a copy constructor and copy assignment operator that re-point optVal to the destination's own optValInt when the source used its internal buffer, while preserving a NULL/external optVal otherwise. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
MattMacGregor
approved these changes
Jun 25, 2026
darshan-verkada
merged commit Jun 25, 2026
17968c8
into
intercom/release-2-15
20 of 31 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-picks two upstream pjproject fixes onto
intercom/release-2-15.Commits
pjsua-lib: Reconnect on registration timeout over reliable transport
Upstream PR: pjsua-lib: Reconnect on registration timeout over reliable transport pjsip/pjproject#5033
pjsua2: Fix SockOpt copy semantics so optVal isn't left aliased
Upstream PR: pjsua2: Fix SockOpt copy semantics so optVal isn't left aliased pjsip/pjproject#5037
🤖 Generated with Claude Code