]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Record the previous port in the temporary address structure so that the comparison...
authorJoshua Colp <jcolp@digium.com>
Mon, 22 Dec 2008 16:08:13 +0000 (16:08 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 22 Dec 2008 16:08:13 +0000 (16:08 +0000)
(closes issue #13628)
Reported by: pananix
Patches:
      bug13628.patch uploaded by jpeeler (license 325)
Tested by: file, blitzrage

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166268 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/dnsmgr.c

index c20d85d2334aac06d0c58cd79b7b5ed2dad1cfe8..54d9467eec36893ce91dee242605d4882a32cb7e 100644 (file)
@@ -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));