[asterisk-commits] dvossel: branch 1.6.2 r206281 - in /branches/1.6.2: ./ channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 13 18:27:41 CDT 2009


Author: dvossel
Date: Mon Jul 13 18:27:36 2009
New Revision: 206281

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=206281
Log:
Merged revisions 206280 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r206280 | dvossel | 2009-07-13 18:26:51 -0500 (Mon, 13 Jul 2009) | 9 lines
  
  dns lookup of peername rather than peer's host in transmit_register()
  
  (closes issue #15052)
  Reported by: fsantulli
  Patches:
        chan_sip_bug_15052_[20090626204511].patch uploaded by fsantulli (license 818)
  Tested by: fsantulli
........

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/channels/chan_sip.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/channels/chan_sip.c?view=diff&rev=206281&r1=206280&r2=206281
==============================================================================
--- branches/1.6.2/channels/chan_sip.c (original)
+++ branches/1.6.2/channels/chan_sip.c Mon Jul 13 18:27:36 2009
@@ -11039,6 +11039,7 @@
 	char tmp[80];
 	char addr[80];
 	struct sip_pvt *p;
+	struct sip_peer *peer;
 	int res;
 	char *fromdomain;
 	char *domainport = NULL;
@@ -11053,8 +11054,12 @@
 
 	if (r->dnsmgr == NULL) {
 		char transport[MAXHOSTNAMELEN];
+		peer = find_peer(r->hostname, NULL, TRUE, FINDPEERS, FALSE);
 		snprintf(transport, sizeof(transport), "_sip._%s", get_transport(r->transport)); /* have to use static get_transport function */
-		ast_dnsmgr_lookup(r->hostname, &r->us, &r->dnsmgr, sip_cfg.srvlookup ? transport : NULL);
+		ast_dnsmgr_lookup(peer ? peer->tohost : r->hostname, &r->us, &r->dnsmgr, sip_cfg.srvlookup ? transport : NULL);
+		if (peer) {
+			unref_peer(peer, "removing peer ref for dnsmgr_lookup");
+		}
 	}
 
 	if (r->call) {	/* We have a registration */




More information about the asterisk-commits mailing list