mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r18224: Paranoia - ensure the oplock event handler is
removed immediately in the handler. Extra debug info tracking down winbindd DC selection. Jeremy.
This commit is contained in:
parent
38b8a2b527
commit
7ba9b6ce58
@ -296,6 +296,9 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
|
||||
|
||||
struct sockaddr_in *peeraddr_in = (struct sockaddr_in *)&peeraddr;
|
||||
|
||||
DEBUG(10,("cm_prepare_connection: connecting to DC %s for domain %s\n",
|
||||
controller, domain->name ));
|
||||
|
||||
machine_password = secrets_fetch_machine_password(lp_workgroup(), NULL,
|
||||
NULL);
|
||||
|
||||
@ -921,6 +924,9 @@ static NTSTATUS cm_open_connection(struct winbindd_domain *domain,
|
||||
|
||||
if ( saf_servername && NT_STATUS_IS_OK(check_negative_conn_cache( domain->name, saf_servername))) {
|
||||
|
||||
DEBUG(10,("cm_open_connection: saf_servername is '%s' for domain %s\n",
|
||||
saf_servername, domain->name ));
|
||||
|
||||
/* convert an ip address to a name */
|
||||
if ( is_ipaddress( saf_servername ) ) {
|
||||
fstring saf_name;
|
||||
@ -949,7 +955,10 @@ static NTSTATUS cm_open_connection(struct winbindd_domain *domain,
|
||||
|
||||
result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
|
||||
|
||||
if ((strlen(domain->dcname) > 0)
|
||||
DEBUG(10,("cm_open_connection: dcname is '%s' for domain %s\n",
|
||||
domain->dcname, domain->name ));
|
||||
|
||||
if (*domain->dcname
|
||||
&& NT_STATUS_IS_OK(check_negative_conn_cache( domain->name, domain->dcname))
|
||||
&& (resolve_name(domain->dcname, &domain->dcaddr.sin_addr, 0x20)))
|
||||
{
|
||||
|
@ -348,6 +348,12 @@ static void oplock_timeout_handler(struct timed_event *te,
|
||||
{
|
||||
files_struct *fsp = (files_struct *)private_data;
|
||||
|
||||
/* Ensure we always remove this event. */
|
||||
if (fsp->oplock_timeout != NULL) {
|
||||
/* Remove the timed event handler. */
|
||||
TALLOC_FREE(fsp->oplock_timeout);
|
||||
fsp->oplock_timeout = NULL;
|
||||
}
|
||||
DEBUG(0, ("Oplock break failed for file %s -- replying anyway\n", fsp->fsp_name));
|
||||
global_client_failed_oplock_break = True;
|
||||
remove_oplock(fsp);
|
||||
|
Loading…
Reference in New Issue
Block a user