diff options
author | Volker Lendecke <vlendec@samba.org> | 2005-10-01 10:00:07 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:04:50 -0500 |
commit | f3d7084bad17fe1d4745493cbf99faaaf5532ab4 (patch) | |
tree | e6421a39b114ce406840be44a5ca5421271945d3 | |
parent | aa0dff680d2ea351a0a21cb86a51cd99887237c4 (diff) | |
download | samba-f3d7084bad17fe1d4745493cbf99faaaf5532ab4.tar.gz samba-f3d7084bad17fe1d4745493cbf99faaaf5532ab4.tar.bz2 samba-f3d7084bad17fe1d4745493cbf99faaaf5532ab4.zip |
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)
-rw-r--r-- | source3/smbd/oplock_irix.c | 28 |
1 files changed, 16 insertions, 12 deletions
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; } |