From f822c17d35921817e19ce0d879788125f361d4b9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 28 Nov 1997 03:30:24 +0000 Subject: fixed a very nasty oplock bug. We could send oplock break requests on files that aren't open if the file happened to close while the oplock was in transit. We would end up sending a oplock break request on another random file (actually the open file that happened to have the highest fnum). Then we wouldn't get a response, so smbd would keep sending and would actually flood the net with an infinite number of oplock break requests! (This used to be commit 0da20e0aecbf3e59bdc649c489a18832403dc9b2) --- source3/smbd/server.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 3f4f6c7034..8a52ddef69 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -2795,11 +2795,12 @@ global_oplocks_open = %d\n", timestring(), dev, inode, global_oplocks_open)); { if(OPEN_FNUM(fnum)) { - fsp = &Files[fnum]; if((fsp->fd_ptr->dev == dev) && (fsp->fd_ptr->inode == inode) && (fsp->open_time.tv_sec == tval->tv_sec) && - (fsp->open_time.tv_usec == tval->tv_usec)) - break; + (fsp->open_time.tv_usec == tval->tv_usec)) { + fsp = &Files[fnum]; + break; + } } } -- cgit