summaryrefslogtreecommitdiff
path: root/source3/libsmb/conncache.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-09-14 16:37:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:51:48 -0500
commit041e49d19604e5e0688abd02869eebabf8c585b0 (patch)
tree1d554b53dc2663bde842c1989eae11e88dbb1598 /source3/libsmb/conncache.c
parent019c89a67e799a2b3cf957dc22c9fd866bb5fcb0 (diff)
downloadsamba-041e49d19604e5e0688abd02869eebabf8c585b0.tar.gz
samba-041e49d19604e5e0688abd02869eebabf8c585b0.tar.bz2
samba-041e49d19604e5e0688abd02869eebabf8c585b0.zip
r18533: Ensure we clear out the failed connection cache for an entire
domain when going back online. Jeremy. (This used to be commit c7e4c8d0b4d109ec67d4424dd446b74b55246c72)
Diffstat (limited to 'source3/libsmb/conncache.c')
-rw-r--r--source3/libsmb/conncache.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source3/libsmb/conncache.c b/source3/libsmb/conncache.c
index 49512d7a2e..b8ddcb2ba9 100644
--- a/source3/libsmb/conncache.c
+++ b/source3/libsmb/conncache.c
@@ -162,3 +162,31 @@ void flush_negative_conn_cache( void )
}
}
+
+/****************************************************************************
+ 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;
+ }
+}