[asterisk-commits] jpeeler: branch jpeeler/sip-dnsmgr r109911 - /team/jpeeler/sip-dnsmgr/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 19 11:10:25 CDT 2008


Author: jpeeler
Date: Wed Mar 19 11:10:24 2008
New Revision: 109911

URL: http://svn.digium.com/view/asterisk?view=rev&rev=109911
Log:
sip show peers reports correct output after IP change now

Modified:
    team/jpeeler/sip-dnsmgr/channels/chan_sip.c

Modified: team/jpeeler/sip-dnsmgr/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/jpeeler/sip-dnsmgr/channels/chan_sip.c?view=diff&rev=109911&r1=109910&r2=109911
==============================================================================
--- team/jpeeler/sip-dnsmgr/channels/chan_sip.c (original)
+++ team/jpeeler/sip-dnsmgr/channels/chan_sip.c Wed Mar 19 11:10:24 2008
@@ -4097,6 +4097,14 @@
 
 	if (peer) {
 		int res = create_addr_from_peer(dialog, peer);
+		if (peer->dnsmgr != NULL) {
+			ast_log(LOG_DEBUG, "IP address from peer dnsmgr resolved to %s\n", ast_inet_ntoa(peer->dnsmgr->last));
+		} else {
+			ast_log(LOG_DEBUG, "peer dnsmgr is NULL\n");
+		}
+
+		memcpy(&peer->addr.sin_addr, &dnsmgr->last, sizeof(peer->addr.sin_addr));
+			
 		unref_peer(peer);
 		ast_log(LOG_DEBUG, "Peer found with address of %s\n", ast_inet_ntoa(dialog->sa.sin_addr));
 




More information about the asterisk-commits mailing list