diff options
author | Jeremy Allison <jra@samba.org> | 2002-05-22 01:04:58 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-05-22 01:04:58 +0000 |
commit | 3c1ff07fa414636dee1f67832c943028223ff703 (patch) | |
tree | 8ea5ea10b1e30028fc071fa0777432c9727596b9 /source3/smbd/process.c | |
parent | dc86e2b710048653fa75a3c39ca8a153a5a10e23 (diff) | |
download | samba-3c1ff07fa414636dee1f67832c943028223ff703.tar.gz samba-3c1ff07fa414636dee1f67832c943028223ff703.tar.bz2 samba-3c1ff07fa414636dee1f67832c943028223ff703.zip |
Merge of receive_local_message fix from 2.2.5.
Jeremy.
(This used to be commit d4dbb9cb1338332bda3651dc4b86abcf47e9c2d2)
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r-- | source3/smbd/process.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 67ceb98539..53f9ff035f 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -109,10 +109,10 @@ BOOL push_oplock_pending_smb_message(char *buf, int msg_len) oplock messages, change notify events etc. ****************************************************************************/ -static void async_processing(fd_set *fds, char *buffer, int buffer_len) +static void async_processing(char *buffer, int buffer_len) { /* check for oplock messages (both UDP and kernel) */ - if (receive_local_message(fds, buffer, buffer_len, 0)) { + if (receive_local_message(buffer, buffer_len, 0)) { process_local_message(buffer, buffer_len); } @@ -206,7 +206,7 @@ static BOOL receive_message_or_smb(char *buffer, int buffer_len, int timeout) is the best we can do until the oplock code knows more about signals */ if (selrtn == -1 && errno == EINTR) { - async_processing(&fds, buffer, buffer_len); + async_processing(buffer, buffer_len); /* * After async processing we must go and do the select again, as * the state of the flag in fds for the server file descriptor is @@ -235,7 +235,7 @@ static BOOL receive_message_or_smb(char *buffer, int buffer_len, int timeout) */ if (oplock_message_waiting(&fds)) { - async_processing(&fds, buffer, buffer_len); + async_processing(buffer, buffer_len); /* * After async processing we must go and do the select again, as * the state of the flag in fds for the server file descriptor is @@ -275,7 +275,6 @@ BOOL receive_next_smb(char *inbuf, int bufsize, int timeout) void respond_to_all_remaining_local_messages(void) { char buffer[1024]; - fd_set fds; /* * Assert we have no exclusive open oplocks. @@ -288,23 +287,12 @@ void respond_to_all_remaining_local_messages(void) } /* - * Setup the select read fd set. - */ - - FD_ZERO(&fds); - if(!setup_oplock_select_set(&fds)) - return; - - /* * Keep doing receive_local_message with a 1 ms timeout until * we have no more messages. */ - while(receive_local_message(&fds, buffer, sizeof(buffer), 1)) { + while(receive_local_message(buffer, sizeof(buffer), 1)) { /* Deal with oplock break requests from other smbd's. */ process_local_message(buffer, sizeof(buffer)); - - FD_ZERO(&fds); - (void)setup_oplock_select_set(&fds); } return; |