From 689ec46450a3f373b583ebe98d124ab4a99ce3ef Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 10 Apr 2000 13:05:23 +0000 Subject: the bulk of the changes to get rid of fd_ptr and move print open handling to printing/printing.c most of this was just replacing things like fsp->fd_ptr->fd with fsp->fd the changes in open.c are quite dramatic. Most of it is removing all the functions that handled the fd multiplexing (This used to be commit d1827a3648009fd0a0d165055015d9aeda7a1037) --- source3/smbd/vfs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source3/smbd/vfs.c') diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 44f44bd169..e92235e230 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -251,11 +251,10 @@ ssize_t vfs_write_data(files_struct *fsp,char *buffer,size_t N) { size_t total=0; ssize_t ret; - int fd = fsp->fd_ptr->fd; while (total < N) { - ret = fsp->conn->vfs_ops.write(fd,buffer + total,N - total); + ret = fsp->conn->vfs_ops.write(fsp->fd,buffer + total,N - total); if (ret == -1) return -1; if (ret == 0) return total; @@ -331,13 +330,13 @@ SMB_OFF_T vfs_transfer_file(int in_fd, files_struct *in_fsp, if (s > ret) { ret += in_fsp ? - in_fsp->conn->vfs_ops.read(in_fsp->fd_ptr->fd,buf1+ret,s-ret) : read(in_fd,buf1+ret,s-ret); + in_fsp->conn->vfs_ops.read(in_fsp->fd,buf1+ret,s-ret) : read(in_fd,buf1+ret,s-ret); } if (ret > 0) { if (out_fsp) { - ret2 = out_fsp->conn->vfs_ops.write(out_fsp->fd_ptr->fd,buf1,ret); + ret2 = out_fsp->conn->vfs_ops.write(out_fsp->fd,buf1,ret); } else { ret2= (out_fd != -1) ? write_data(out_fd,buf1,ret) : ret; } -- cgit