[asterisk-commits] dvossel: branch 1.6.1 r206282 - in /branches/1.6.1: ./ channels/chan_sip.c

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


Author: dvossel
Date: Mon Jul 13 18:33:18 2009
New Revision: 206282

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=206282
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.1/   (props changed)
    branches/1.6.1/channels/chan_sip.c

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

Modified: branches/1.6.1/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.1/channels/chan_sip.c?view=diff&rev=206282&r1=206281&r2=206282
==============================================================================
--- branches/1.6.1/channels/chan_sip.c (original)
+++ branches/1.6.1/channels/chan_sip.c Mon Jul 13 18:33:18 2009
@@ -10320,6 +10320,7 @@
 	char tmp[80];
 	char addr[80];
 	struct sip_pvt *p;
+	struct sip_peer *peer;
 	int res;
 	char *fromdomain;
 
@@ -10333,8 +10334,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, global_srvlookup ? transport : NULL);
+		ast_dnsmgr_lookup(peer ? peer->tohost : r->hostname, &r->us, &r->dnsmgr, global_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