Fix for read_file() returning -1.
authorJeremy Allison <jra@samba.org>
Fri, 5 May 2000 02:39:02 +0000 (02:39 +0000)
committerJeremy Allison <jra@samba.org>
Fri, 5 May 2000 02:39:02 +0000 (02:39 +0000)
Jeremy.

source/smbd/fileio.c

index 2d83378b3dee6a6b1b535c9f74dff9abc368fc35..6507f5660626d5f80a08e4d490bfc9c3e3468e3a 100644 (file)
@@ -116,6 +116,8 @@ ssize_t read_file(files_struct *fsp,char *data,SMB_OFF_T pos,size_t n)
   
   if (n > 0) {
     readret = fsp->conn->vfs_ops.read(fsp->fd,data,n);
+    if (readret == -1)
+      return -1;
     if (readret > 0) ret += readret;
   }