From d07458bd67a29c0a8abfa6e72115732e18f51b2f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 7 Sep 2006 16:51:17 +0000 Subject: r18224: Paranoia - ensure the oplock event handler is removed immediately in the handler. Extra debug info tracking down winbindd DC selection. Jeremy. (This used to be commit 7ba9b6ce588f716589e9f88ed146fad36c4b3758) --- source3/smbd/oplock.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/smbd') diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index eec19259d0..aaa236effa 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -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); -- cgit