Author: vlendec
Date: 2005-10-01 10:00:07 +0000 (Sat, 01 Oct 2005)
New Revision: 10672

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10672

Log:
Attempt to fix the IRIX build. James, could you test the Oplock code on a box?

Thanks,

Volker

Modified:
   branches/SAMBA_3_0/source/smbd/oplock_irix.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/oplock_irix.c
===================================================================
--- branches/SAMBA_3_0/source/smbd/oplock_irix.c        2005-10-01 09:43:53 UTC 
(rev 10671)
+++ branches/SAMBA_3_0/source/smbd/oplock_irix.c        2005-10-01 10:00:07 UTC 
(rev 10672)
@@ -99,8 +99,9 @@
         */
 
        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 @@
         */
 
        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 @@
         * 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;
 }

Reply via email to