From be71d43585cf4b42efff7995dbf061fddd6077f5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 20 Dec 1997 14:36:11 +0000 Subject: client.c: clientgen.c: clientutil.c: clitar.c: Changed usage of receive_smb to new function client_receive_smb except for one use of receive_smb in client.c. This is the receive_smb used to discard packets received whilst in a keyboard wait state. util.c: Created new function client_receive_smb that ignores session keepalives just as the old receive_smb used to do. Created internal function read_smb_length_return_keepalive that is used internally by the changed receive_smb call. Changed read_smb_len to not use an internal buffer - it is never called with a null buffer so such code is redundant. Jeremy. (This used to be commit 1084fb46821cb96702da35439da4a8df9d255698) --- source3/client/clitar.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'source3/client/clitar.c') diff --git a/source3/client/clitar.c b/source3/client/clitar.c index 1e7c45691b..05cb13656a 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -472,7 +472,7 @@ static int do_setrattr(char *fname, int attr, int setit) *p++ = 0; send_smb(Client,outbuf); - receive_smb(Client,inbuf,CLIENT_TIMEOUT); + client_receive_smb(Client,inbuf,CLIENT_TIMEOUT); if (CVAL(inbuf,smb_rcls) != 0) DEBUG(5,("getatr: %s\n",smb_errstr(inbuf))); @@ -510,7 +510,7 @@ static int do_setrattr(char *fname, int attr, int setit) *p++ = 0; send_smb(Client,outbuf); - receive_smb(Client,inbuf,CLIENT_TIMEOUT); + client_receive_smb(Client,inbuf,CLIENT_TIMEOUT); if (CVAL(inbuf,smb_rcls) != 0) { @@ -547,7 +547,7 @@ static BOOL smbcreat(file_info finfo, int *fnum, char *inbuf, char *outbuf) strcpy(p,finfo.name); send_smb(Client,outbuf); - receive_smb(Client,inbuf,CLIENT_TIMEOUT); + client_receive_smb(Client,inbuf,CLIENT_TIMEOUT); if (CVAL(inbuf,smb_rcls) != 0) { @@ -586,7 +586,7 @@ static BOOL smbwrite(int fnum, int n, int low, int high, int left, SSVAL(smb_buf(outbuf),1,n); send_smb(Client,outbuf); - receive_smb(Client,inbuf,CLIENT_TIMEOUT); + client_receive_smb(Client,inbuf,CLIENT_TIMEOUT); if (CVAL(inbuf,smb_rcls) != 0) { @@ -625,7 +625,7 @@ static BOOL smbshut(file_info finfo, int fnum, char *inbuf, char *outbuf) finfo.mtime)); send_smb(Client,outbuf); - receive_smb(Client,inbuf,CLIENT_TIMEOUT); + client_receive_smb(Client,inbuf,CLIENT_TIMEOUT); if (CVAL(inbuf,smb_rcls) != 0) { @@ -655,7 +655,7 @@ static BOOL smbchkpath(char *fname, char *inbuf, char *outbuf) strcpy(p,fname); send_smb(Client,outbuf); - receive_smb(Client,inbuf,CLIENT_TIMEOUT); + client_receive_smb(Client,inbuf,CLIENT_TIMEOUT); DEBUG(5,("smbchkpath: %s\n",smb_errstr(inbuf))); @@ -682,7 +682,7 @@ static BOOL smbmkdir(char *fname, char *inbuf, char *outbuf) strcpy(p,fname); send_smb(Client,outbuf); - receive_smb(Client,inbuf,CLIENT_TIMEOUT); + client_receive_smb(Client,inbuf,CLIENT_TIMEOUT); if (CVAL(inbuf,smb_rcls) != 0) { @@ -828,7 +828,7 @@ static void do_atar(char *rname,char *lname,file_info *finfo1) } send_smb(Client,outbuf); - receive_smb(Client,inbuf,CLIENT_TIMEOUT); + client_receive_smb(Client,inbuf,CLIENT_TIMEOUT); if (CVAL(inbuf,smb_rcls) != 0) { @@ -962,7 +962,7 @@ static void do_atar(char *rname,char *lname,file_info *finfo1) } send_smb(Client,outbuf); - receive_smb(Client,inbuf,CLIENT_TIMEOUT); + client_receive_smb(Client,inbuf,CLIENT_TIMEOUT); if (CVAL(inbuf,smb_rcls) != 0) { @@ -1056,7 +1056,7 @@ static void do_atar(char *rname,char *lname,file_info *finfo1) SSVAL(outbuf,smb_vwv4,finfo.size - nread); send_smb(Client,outbuf); - receive_smb(Client,inbuf,CLIENT_TIMEOUT); + client_receive_smb(Client,inbuf,CLIENT_TIMEOUT); if (CVAL(inbuf,smb_rcls) != 0) { @@ -1117,7 +1117,7 @@ static void do_atar(char *rname,char *lname,file_info *finfo1) SIVALS(outbuf,smb_vwv1,-1); send_smb(Client,outbuf); - receive_smb(Client,inbuf,CLIENT_TIMEOUT); + client_receive_smb(Client,inbuf,CLIENT_TIMEOUT); if (!ignore_close_error && CVAL(inbuf,smb_rcls) != 0) { -- cgit