summaryrefslogtreecommitdiff
path: root/source3/smbd/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r--source3/smbd/server.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index d51c43c2f7..3f4f6c7034 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -3087,6 +3087,32 @@ oplock break response from pid %d on port %d for dev = %x, inode = %x.\n",
}
/****************************************************************************
+Get the next SMB packet, doing the local message processing automatically.
+****************************************************************************/
+
+BOOL receive_next_smb(int smbfd, int oplockfd, char *inbuf, int bufsize, int timeout)
+{
+ BOOL got_smb = False;
+ BOOL ret;
+
+ do
+ {
+ ret = receive_message_or_smb(smbfd,oplockfd,inbuf,bufsize,
+ timeout,&got_smb);
+
+ if(ret && !got_smb)
+ {
+ /* Deal with oplock break requests from other smbd's. */
+ process_local_message(oplock_sock, inbuf, bufsize);
+ continue;
+ }
+ }
+ while(ret && !got_smb);
+
+ return ret;
+}
+
+/****************************************************************************
check if a snum is in use
****************************************************************************/
BOOL snum_used(int snum)