#1962 closed defect (fixed)
Premature STUN socket destruction when there's an error during STUN server resolution
Reported by: | ming | Owned by: | bennylp |
---|---|---|---|
Priority: | normal | Milestone: | release-2.6 |
Component: | pjsua-lib | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: | no |
Description
Sample stack trace:
(1) resolve_stun_entry() -> pj_stun_sock_start() -> get_mapped_addr() -> sess_fail() -> test_stun_on_status() -> (2) resolve_stun_entry()
The problem is caused if get_mapped_addr() fail, then test_stun_on_status() will destroy the (failed) STUN socket, and calls resolve_stun_entry no (2), which will then try another STUN candidate. However, after returning, the resolve_stun_entry no (1) will destroy the STUN socket again, incorrectly, for the new candidate being tried.
Thanks to Dusan Klinec for the report and the patch.
Change History (2)
comment:1 Changed 8 years ago by ming
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 8 years ago by ming
In 5449:
Note: See
TracTickets for help on using
tickets.
In 5442: