Fixed the bug that causes the master parent smbd to crash rather than
authorJeremy Allison <jra@samba.org>
Fri, 23 Apr 1999 23:46:51 +0000 (23:46 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 23 Apr 1999 23:46:51 +0000 (23:46 +0000)
shutdown cleanly. It was one of the oplock fixes that broke it.
Jeremy.

source/smbd/oplock.c
source/smbd/process.c

index f5792a27fa57b285480a98fec17096403ab6f629..32bd39eab85f3d6da932bcbd95f08acae20854b7 100644 (file)
@@ -370,6 +370,9 @@ int setup_oplock_select_set( fd_set *fds)
   int maxfd = oplock_sock;
   FD_SET(oplock_sock,fds);
 
+  if(oplock_sock == -1)
+    return 0;
+
 #if defined(HAVE_KERNEL_OPLOCKS)
   if(lp_kernel_oplocks()) {
     FD_SET(oplock_pipe_read,fds); 
index ccd795ab464520f9b4d54d6d0bb8d35a968db4d8..a3660be045f5f62621325e6f0ef16098343e56e6 100644 (file)
@@ -258,7 +258,8 @@ void respond_to_all_remaining_local_messages(void)
    */
 
   FD_ZERO(&fds);
-  (void)setup_oplock_select_set(&fds);
+  if(!setup_oplock_select_set(&fds))
+    return;
 
   /*
    * Keep doing receive_local_message with a 1 ms timeout until