summaryrefslogtreecommitdiff
path: root/Makefile.moddir_rules
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2012-01-30 23:58:51 +0000
committerTerry Wilson <twilson@digium.com>2012-01-30 23:58:51 +0000
commitde57235ac6b9c69a8accec36e612a13f61a41c45 (patch)
tree3969a9f1d54584fc9e83dbbb16e9ac135c947e86 /Makefile.moddir_rules
parentf92d6412ab5d5a157261de8c7476c4d762f252e8 (diff)
Re-link peers by IP when dnsmgr changes the IP
Asterisk's dnsmgr currently takes a pointer to an ast_sockaddr and updates it anytime an address resolves to something different. There are a couple of issues with this. First, the ast_sockaddr is usually the address of an ast_sockaddr inside a refcounted struct and we never bump the refcount of those structs when using dnsmgr. This makes it possible that a refresh could happen after the destructor for that object is called (despite ast_dnsmgr_release being called in that destructor). Second, the module using dnsmgr cannot be aware of an address changing without polling for it in the code. If an action needs to be taken on address update (like re-linking a SIP peer in the peers_by_ip table), then polling for this change negates many of the benefits of having dnsmgr in the first place. This patch adds a function to the dnsmgr API that calls an update callback instead of blindly updating the address itself. It also moves calls to ast_dnsmgr_release outside of the destructor functions and into cleanup functions that are called when we no longer need the objects and increments the refcount of the objects using dnsmgr since those objects are stored on the ast_dnsmgr_entry struct. A helper function for returning the proper default SIP port (non-tls vs tls) is also added and used. This patch also incorporates changes from a patch posted by Timo Teräs to ASTERISK-19106 for related dnsmgr issues. (closes issue ASTERISK-19106) Review: https://reviewboard.asterisk.org/r/1691/ ........ Merged revisions 353371 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 353397 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'Makefile.moddir_rules')
0 files changed, 0 insertions, 0 deletions