Merged revisions 333837 via svnmerge from
authorTerry Wilson <twilson@digium.com>
Mon, 29 Aug 2011 21:43:33 +0000 (21:43 +0000)
committerTerry Wilson <twilson@digium.com>
Mon, 29 Aug 2011 21:43:33 +0000 (21:43 +0000)
commitba3d34708eabe4f0bb12a829452b42534d3381ff
treec7478ca6a601deacdb1ca379414cd2f6e4b2af16
parentd9526bc6c8922b5165b031b003f7b53624f73008
Merged revisions 333837 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r333837 | twilson | 2011-08-29 16:41:13 -0500 (Mon, 29 Aug 2011) | 22 lines

  Merged revisions 333836 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.8

  ........
    r333836 | twilson | 2011-08-29 16:38:31 -0500 (Mon, 29 Aug 2011) | 15 lines

    Refresh peer address if DNS unavailable at peer creation

    If Asterisk starts and no DNS is available, outbound registrations will fail
    indefinitely. This patch copies the address from the sip_registry struct, which
    will be updated, to the peer->addr when necessary.

    If dnsmgr is enabled, the registration fails without the patch because even
    though the address on the registry is updated via dnsmgr, the address is just
    copied on the first try. Since we use ast_sockaddr_copy, dnsmgr can't update
    the address that is copied to the sip_pvt or peers.

    Closes issue ASTERISK-18000

    Review: https://reviewboard.asterisk.org/r/1335/
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@333838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c