diff options
author | Jeremy Allison <jra@samba.org> | 2007-11-05 11:12:56 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-11-05 11:12:56 -0800 |
commit | 255c2adf7b6ef30932b5bb9f142ccef4a5d3d0db (patch) | |
tree | bf41e986c53b419b97c8eb02c60a99b6996aa01d /source/smbd/reply.c | |
parent | 5721a511d8dd327717bcd9c2053c4bd08f01185c (diff) | |
download | samba-255c2adf7b6ef30932b5bb9f142ccef4a5d3d0db.tar.gz samba-255c2adf7b6ef30932b5bb9f142ccef4a5d3d0db.tar.xz samba-255c2adf7b6ef30932b5bb9f142ccef4a5d3d0db.zip |
Remove the horror that was the global smb_rw_error.
Each cli struct has it's own local copy of this variable,
so use that in client code. In the smbd server, add one
static to smbd/proccess.c and use that inside smbd. Fix
a bunch of places where smb_rw_error could be set by
calling read_data() in places where we weren't reading
from the SMB client socket (ie. winbindd).
Jeremy.
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r-- | source/smbd/reply.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c index a7fa67df227..1b36fb1e440 100644 --- a/source/smbd/reply.c +++ b/source/smbd/reply.c @@ -3535,7 +3535,8 @@ void reply_writebraw(connection_struct *conn, struct smb_request *req) } /* Now read the raw data into the buffer and write it */ - if (read_smb_length(smbd_server_fd(),buf,SMB_SECONDARY_WAIT) == -1) { + if (read_smb_length(smbd_server_fd(),buf, + SMB_SECONDARY_WAIT, get_srv_read_error()) == -1) { exit_server_cleanly("secondary writebraw failed"); } @@ -3564,7 +3565,7 @@ void reply_writebraw(connection_struct *conn, struct smb_request *req) (int)tcount,(int)nwritten,(int)numtowrite)); } - if (read_data(smbd_server_fd(), buf+4, numtowrite) + if (read_data(smbd_server_fd(), buf+4, numtowrite,get_srv_read_error()) != numtowrite ) { DEBUG(0,("reply_writebraw: Oversize secondary write " "raw read failed (%s). Terminating\n", |