#686 closed defect (fixed)
Failure to cancel outstanding DNS SRV query job (API change)
Reported by: | bennylp | Owned by: | bennylp |
---|---|---|---|
Priority: | normal | Milestone: | release-1.0.1 |
Component: | pjlib-util | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: |
Description (last modified by bennylp)
The DNS SRV resolver (the pj_dns_srv_resolve() function) provides a feature to cancel outstanding DNS SRV query job, by using pj_dns_resolver_cancel_query().
This doesn't work for DNS SRV resolver, because once the resolver is in the state of resolving hosts with DNS A resolution, the current query job is now different than that is returned by the original pj_dns_srv_resolve() call.
This will cause pj_dns_resolver_cancel_query() to potentially cancel the wrong query, and because the intended query or queries are not canceled, they will call the callback when the DNS response is finally received, and this will cause crash/segmentation fault (or assertion in debug mode).
The crash is reproducible by running pjnath unit test, in the TURN socket destroy test (on Linux i386, gcc-4.1.1).
Change History (3)
comment:1 Changed 16 years ago by bennylp
- Description modified (diff)
comment:2 Changed 16 years ago by bennylp
- Resolution set to fixed
- Status changed from new to closed
comment:3 Changed 16 years ago by bennylp
In r2390:
- fixed bug in handling strayed callback
Done in r2387.