Skip to content

INT-10169: Cherry-pick upstream pjproject fixes (PR #5033, #5037) - #16

Merged
darshan-verkada merged 2 commits into
intercom/release-2-15from
dev/darshan.patel/cherry-pick-5037-5033
Jun 25, 2026
Merged

INT-10169: Cherry-pick upstream pjproject fixes (PR #5033, #5037)#16
darshan-verkada merged 2 commits into
intercom/release-2-15from
dev/darshan.patel/cherry-pick-5037-5033

Conversation

@darshan-verkada

@darshan-verkada darshan-verkada commented Jun 23, 2026

Copy link
Copy Markdown

Cherry-picks two upstream pjproject fixes onto intercom/release-2-15.

Commits

🤖 Generated with Claude Code

darshan-verkada and others added 2 commits June 23, 2026 16:32
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>
@darshan-verkada
darshan-verkada merged commit 17968c8 into intercom/release-2-15 Jun 25, 2026
20 of 31 checks passed
@darshan-verkada darshan-verkada changed the title Cherry-pick upstream pjproject fixes (PR #5033, #5037) INT-10169: Cherry-pick upstream pjproject fixes (PR #5033, #5037) Jun 25, 2026
@linear-code

linear-code Bot commented Jun 25, 2026

Copy link
Copy Markdown

INT-10169

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.

2 participants