diff options
author | Jeremy Allison <jra@samba.org> | 2003-06-10 22:11:30 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-06-10 22:11:30 +0000 |
commit | 3ef930a8e9f4574b697968e15b2468aa01863929 (patch) | |
tree | 966efbd6d512b70272a265600702fd59632baab2 /source3/nsswitch/winbindd_cm.c | |
parent | 2a14d6158f29ffd9f66ea6136a3015517a14af45 (diff) | |
download | samba-3ef930a8e9f4574b697968e15b2468aa01863929.tar.gz samba-3ef930a8e9f4574b697968e15b2468aa01863929.tar.bz2 samba-3ef930a8e9f4574b697968e15b2468aa01863929.zip |
Add in rety loop for query_user_list (from APP_HEAD). Deals with a bug
using MSRPC backend and should be safe with ldap backend.
Jeremy.
(This used to be commit 67535329a2df8986c2d1d85e25cd5c558ee61405)
Diffstat (limited to 'source3/nsswitch/winbindd_cm.c')
-rw-r--r-- | source3/nsswitch/winbindd_cm.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index 9a34293cdb..381cdaaa20 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -659,3 +659,34 @@ void winbindd_cm_status(void) else DEBUG(0, ("\tNo active connections\n")); } + +/* Close all cached connections */ + +void winbindd_cm_flush(void) +{ + struct winbindd_cm_conn *conn, tmp; + + /* Flush connection cache */ + + for (conn = cm_conns; conn; conn = conn->next) { + + if (!connection_ok(conn)) + continue; + + DEBUG(10, ("Closing connection to %s on %s\n", + conn->pipe_name, conn->controller)); + + if (conn->cli) + cli_shutdown(conn->cli); + + tmp.next = conn->next; + + DLIST_REMOVE(cm_conns, conn); + SAFE_FREE(conn); + conn = &tmp; + } + + /* Flush failed connection cache */ + + flush_negative_conn_cache(); +} |