[svn-commits] file: trunk r166268 - /trunk/main/dnsmgr.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Dec 22 10:08:13 CST 2008


Author: file
Date: Mon Dec 22 10:08:13 2008
New Revision: 166268

URL: http://svn.digium.com/view/asterisk?view=rev&rev=166268
Log:
Record the previous port in the temporary address structure so that the comparison does not treat the host as having changed even if it did not. This would have been uninitialized before and would have led to a baddddd port.
(closes issue #13628)
Reported by: pananix
Patches:
      bug13628.patch uploaded by jpeeler (license 325)
Tested by: file, blitzrage

Modified:
    trunk/main/dnsmgr.c

Modified: trunk/main/dnsmgr.c
URL: http://svn.digium.com/view/asterisk/trunk/main/dnsmgr.c?view=diff&rev=166268&r1=166267&r2=166268
==============================================================================
--- trunk/main/dnsmgr.c (original)
+++ trunk/main/dnsmgr.c Mon Dec 22 10:08:13 2008
@@ -164,6 +164,8 @@
 	if (verbose)
 		ast_verb(3, "refreshing '%s'\n", entry->name);
 
+	tmp.sin_port = entry->last.sin_port;
+	
 	if (!ast_get_ip_or_srv(&tmp, entry->name, entry->service) && inaddrcmp(&tmp, &entry->last)) {
 		ast_copy_string(iabuf, ast_inet_ntoa(entry->last.sin_addr), sizeof(iabuf));
 		ast_copy_string(iabuf2, ast_inet_ntoa(tmp.sin_addr), sizeof(iabuf2));




More information about the svn-commits mailing list