svn commit: samba r18533 - in branches/SAMBA_3_0/source: libsmb
nsswitch
jra at samba.org
jra at samba.org
Thu Sep 14 16:37:13 GMT 2006
Author: jra
Date: 2006-09-14 16:37:13 +0000 (Thu, 14 Sep 2006)
New Revision: 18533
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18533
Log:
Ensure we clear out the failed connection cache for an entire
domain when going back online.
Jeremy.
Modified:
branches/SAMBA_3_0/source/libsmb/conncache.c
branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/conncache.c
===================================================================
--- branches/SAMBA_3_0/source/libsmb/conncache.c 2006-09-14 16:35:22 UTC (rev 18532)
+++ branches/SAMBA_3_0/source/libsmb/conncache.c 2006-09-14 16:37:13 UTC (rev 18533)
@@ -162,3 +162,31 @@
}
}
+
+/****************************************************************************
+ Remove all negative entries for a domain. Used when going to online state in
+ winbindd.
+****************************************************************************/
+
+void flush_negative_conn_cache_for_domain(const char *domain)
+{
+ struct failed_connection_cache *fcc;
+
+ fcc = failed_connection_cache;
+
+ while (fcc) {
+ struct failed_connection_cache *fcc_next;
+
+ fcc_next = fcc->next;
+
+ if (strequal(fcc->domain_name, domain)) {
+ DEBUG(10,("flush_negative_conn_cache_for_domain: removed server %s "
+ " from failed cache for domain %s\n",
+ fcc->controller, domain));
+ DLIST_REMOVE(failed_connection_cache, fcc);
+ free(fcc);
+ }
+
+ fcc = fcc_next;
+ }
+}
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c 2006-09-14 16:35:22 UTC (rev 18532)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c 2006-09-14 16:37:13 UTC (rev 18533)
@@ -584,9 +584,9 @@
static void winbindd_flush_negative_conn_cache(struct winbindd_domain *domain)
{
- check_negative_conn_cache_timeout(domain->name, domain->dcname, 0);
+ flush_negative_conn_cache_for_domain(domain->name);
if (*domain->alt_name) {
- check_negative_conn_cache_timeout(domain->alt_name, domain->dcname, 0);
+ flush_negative_conn_cache_for_domain(domain->alt_name);
}
}
More information about the samba-cvs
mailing list