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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jun 18 11:56:06 CDT 2007


Author: file
Date: Mon Jun 18 11:56:06 2007
New Revision: 69709

URL: http://svn.digium.com/view/asterisk?view=rev&rev=69709
Log:
Merged revisions 69708 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r69708 | file | 2007-06-18 12:51:36 -0400 (Mon, 18 Jun 2007) | 2 lines

Remember the DNS lookup done when dnsmgr is called for the first time so that it does not needlessly spit out changed messages when the host really didn't change.

........

Modified:
    trunk/   (props changed)
    trunk/main/dnsmgr.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/dnsmgr.c
URL: http://svn.digium.com/view/asterisk/trunk/main/dnsmgr.c?view=diff&rev=69709&r1=69708&r2=69709
==============================================================================
--- trunk/main/dnsmgr.c (original)
+++ trunk/main/dnsmgr.c Mon Jun 18 11:56:06 2007
@@ -96,6 +96,7 @@
 	entry->result = result;
 	ast_mutex_init(&entry->lock);
 	strcpy(entry->name, name);
+	memcpy(&entry->last, result, sizeof(entry->last));
 
 	AST_RWLIST_WRLOCK(&entry_list);
 	AST_RWLIST_INSERT_HEAD(&entry_list, entry, list);
@@ -233,14 +234,14 @@
 
 	if (option_verbose > 2)
 		ast_verbose(VERBOSE_PREFIX_2 "Refreshing DNS lookups.\n");
-	AST_LIST_LOCK(info->entries);
-	AST_LIST_TRAVERSE(info->entries, entry, list) {
+	AST_RWLIST_RDLOCK(info->entries);
+	AST_RWLIST_TRAVERSE(info->entries, entry, list) {
 		if (info->regex_present && regexec(&info->filter, entry->name, 0, NULL, 0))
 		    continue;
 
 		dnsmgr_refresh(entry, info->verbose);
 	}
-	AST_LIST_UNLOCK(info->entries);
+	AST_RWLIST_UNLOCK(info->entries);
 
 	ast_mutex_unlock(&refresh_lock);
 




More information about the svn-commits mailing list