diff options
author | Andrew Tridgell <tridge@samba.org> | 1996-08-21 14:15:09 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1996-08-21 14:15:09 +0000 |
commit | 78f62c83be5df6b66aa0b5e83b2d290f97ce53c2 (patch) | |
tree | 7b45d9009e8c32d5b6ee4823e4591effb4051474 | |
parent | 1c62aa14cc5e43d47c9932d5c965ba834729e2f9 (diff) | |
download | samba-78f62c83be5df6b66aa0b5e83b2d290f97ce53c2.tar.gz |
- fix a bug handling readraw packets that caused the timeout to be 30
milliseconds instead of 30 seconds as was intended. Thanks to Paul
Nelson for finding this bug.
-rw-r--r-- | source/include/smb.h | 8 | ||||
-rw-r--r-- | source/smbd/ipc.c | 2 | ||||
-rw-r--r-- | source/smbd/trans2.c | 2 |
3 files changed, 4 insertions, 8 deletions
diff --git a/source/include/smb.h b/source/include/smb.h index 7e002122cc7..f5d35d5261e 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -101,12 +101,8 @@ typedef unsigned int uint32; #define DEF_CREATE_MASK (0755) #endif -#ifndef DEFAULT_PIPE_TIMEOUT -#define DEFAULT_PIPE_TIMEOUT 10000000 /* Ten seconds */ -#endif - -/* how long to wait for secondary SMB packets (seconds) */ -#define SMB_SECONDARY_WAIT 30 +/* how long to wait for secondary SMB packets (milli-seconds) */ +#define SMB_SECONDARY_WAIT (60*1000) /* debugging code */ #ifndef SYSLOG diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c index 920284fc9f9..dd9b9661ae8 100644 --- a/source/smbd/ipc.c +++ b/source/smbd/ipc.c @@ -2823,7 +2823,7 @@ int reply_trans(char *inbuf,char *outbuf) { int pcnt,poff,dcnt,doff,pdisp,ddisp; - if (!receive_smb(Client,inbuf, SMB_SECONDARY_WAIT*1000) || + if (!receive_smb(Client,inbuf, SMB_SECONDARY_WAIT) || CVAL(inbuf, smb_com) != SMBtrans) { DEBUG(2,("Invalid secondary trans2 packet\n")); diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c index 321dabc72cf..9b5419010e2 100644 --- a/source/smbd/trans2.c +++ b/source/smbd/trans2.c @@ -1554,7 +1554,7 @@ int reply_trans2(char *inbuf,char *outbuf,int length,int bufsize) while( num_data_sofar < total_data || num_params_sofar < total_params) { - if(!receive_smb(Client,inbuf, SMB_SECONDARY_WAIT*1000) || + if(!receive_smb(Client,inbuf, SMB_SECONDARY_WAIT) || CVAL(inbuf, smb_com) != SMBtranss2) { outsize = set_message(outbuf,0,0,True); |