From 64d20453d97f08e412a2dc51d8d131d630f63999 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 26 Mar 2002 22:36:27 +0000 Subject: Don't hold the mutex for more than 20 seconds. Jeremy. (This used to be commit 1b9f1a368f2f37700cef357ab4bbc0389ec06378) --- source3/auth/auth_domain.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/auth/auth_domain.c') diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c index 5e3a4cd95b..38b48d85ad 100644 --- a/source3/auth/auth_domain.c +++ b/source3/auth/auth_domain.c @@ -87,11 +87,13 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, /* we use a mutex to prevent two connections at once - when a NT PDC gets two connections where one hasn't completed a negprot yet it will send a TCP reset to the first connection (tridge) */ - if (!message_named_mutex(server)) { - DEBUG(1,("domain mutex failed for %s\n", server)); + if (!message_named_mutex(server, 20)) { + DEBUG(1,("connect_to_domain_password_server: domain mutex failed for %s\n", server)); return NT_STATUS_UNSUCCESSFUL; } + DEBUG(10,("connect_to_domain_password_server: got mutex for %s\n", server)); + /* Attempt connection */ result = cli_full_connection(cli, global_myname, server, &dest_ip, 0, "IPC$", "IPC", "", "", "", 0); -- cgit