From bec885e9cdfc2a633539b6938f6465fbc2355bd2 Mon Sep 17 00:00:00 2001 From: file Date: Mon, 22 Dec 2008 16:10:22 +0000 Subject: Merged revisions 166268 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r166268 | file | 2008-12-22 12:08:13 -0400 (Mon, 22 Dec 2008) | 7 lines 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 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@166272 f38db490-d61c-443f-a65b-d21fe96a405b --- main/dnsmgr.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main/dnsmgr.c') diff --git a/main/dnsmgr.c b/main/dnsmgr.c index 2df778b45..841020d37 100644 --- a/main/dnsmgr.c +++ b/main/dnsmgr.c @@ -164,6 +164,8 @@ static int dnsmgr_refresh(struct ast_dnsmgr_entry *entry, int verbose) 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)); -- cgit v1.2.3