From f3d7084bad17fe1d4745493cbf99faaaf5532ab4 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 1 Oct 2005 10:00:07 +0000 Subject: r10672: Attempt to fix the IRIX build. James, could you test the Oplock code on a box? Thanks, Volker (This used to be commit 9fcf83dcd828515a6f6ac535cd47398b7e04e748) --- source3/smbd/oplock_irix.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/oplock_irix.c b/source3/smbd/oplock_irix.c index f49aa297e4..2224f9a668 100644 --- a/source3/smbd/oplock_irix.c +++ b/source3/smbd/oplock_irix.c @@ -99,8 +99,9 @@ static files_struct *irix_oplock_receive_message(fd_set *fds) */ if(read(oplock_pipe_read, &dummy, 1) != 1) { - DEBUG(0,("irix_oplock_receive_message: read of kernel notification failed. \ -Error was %s.\n", strerror(errno) )); + DEBUG(0,("irix_oplock_receive_message: read of kernel " + "notification failed. Error was %s.\n", + strerror(errno) )); smb_read_error = READ_ERROR; return NULL; } @@ -112,14 +113,14 @@ Error was %s.\n", strerror(errno) )); */ if(sys_fcntl_ptr(oplock_pipe_read, F_OPLKSTAT, &os) < 0) { - DEBUG(0,("irix_oplock_receive_message: fcntl of kernel notification failed. \ -Error was %s.\n", strerror(errno) )); + DEBUG(0,("irix_oplock_receive_message: fcntl of kernel " + "notification failed. Error was %s.\n", + strerror(errno) )); if(errno == EAGAIN) { /* * Duplicate kernel break message - ignore. */ - memset(buffer, '\0', KERNEL_OPLOCK_BREAK_MSG_LEN); - return True; + return NULL; } smb_read_error = READ_ERROR; return NULL; @@ -130,14 +131,17 @@ Error was %s.\n", strerror(errno) )); * is the first fsp open with this dev,ino pair. */ - if ((fsp = file_find_di_first((SMB_DEV_T)os.os_dev, (SMB_INO_T)os.os_ino)) == NULL) { - DEBUG(0,("irix_oplock_receive_message: unable to find open file with dev = %x, inode = %.0f\n", - (unsigned int)os.os_dev, (double)os.os_ino )); - return False; + if ((fsp = file_find_di_first((SMB_DEV_T)os.os_dev, + (SMB_INO_T)os.os_ino)) == NULL) { + DEBUG(0,("irix_oplock_receive_message: unable to find open " + "file with dev = %x, inode = %.0f\n", + (unsigned int)os.os_dev, (double)os.os_ino )); + return NULL; } - DEBUG(5,("irix_oplock_receive_message: kernel oplock break request received for \ -dev = %x, inode = %.0f\n, file_id = %ul", (unsigned int)fsp->dev, (double)fsp->inode, fsp->file_id )); + DEBUG(5,("irix_oplock_receive_message: kernel oplock break request " + "received for dev = %x, inode = %.0f\n, file_id = %ul", + (unsigned int)fsp->dev, (double)fsp->inode, fsp->file_id )); return fsp; } -- cgit