summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1996-08-21 14:15:09 +0000
committerAndrew Tridgell <tridge@samba.org>1996-08-21 14:15:09 +0000
commit3d088fd65e3e49949dfd98b464ad6e08f6115099 (patch)
tree226d7b7af24328fc0080a46a2276e2ea740ac7d3 /source3
parent5d39d23f04425ab8602da0e56ef00056dfd2d8ff (diff)
downloadsamba-3d088fd65e3e49949dfd98b464ad6e08f6115099.tar.gz
samba-3d088fd65e3e49949dfd98b464ad6e08f6115099.tar.bz2
samba-3d088fd65e3e49949dfd98b464ad6e08f6115099.zip
- 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. (This used to be commit 78f62c83be5df6b66aa0b5e83b2d290f97ce53c2)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/smb.h8
-rw-r--r--source3/smbd/ipc.c2
-rw-r--r--source3/smbd/trans2.c2
3 files changed, 4 insertions, 8 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 7e002122cc..f5d35d5261 100644
--- a/source3/include/smb.h
+++ b/source3/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/source3/smbd/ipc.c b/source3/smbd/ipc.c
index 920284fc9f..dd9b9661ae 100644
--- a/source3/smbd/ipc.c
+++ b/source3/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/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 321dabc72c..9b5419010e 100644
--- a/source3/smbd/trans2.c
+++ b/source3/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);