1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-19 04:23:48 +03:00

r18533: Ensure we clear out the failed connection cache for an entire

domain when going back online.
Jeremy.
This commit is contained in:
Jeremy Allison
2006-09-14 16:37:13 +00:00
committed by Gerald (Jerry) Carter
parent 8c5c4959ed
commit c7e4c8d0b4
2 changed files with 30 additions and 2 deletions

View File

@@ -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;
}
}