- fix a bug handling readraw packets that caused the timeout to be 30
authorAndrew Tridgell <tridge@samba.org>
Wed, 21 Aug 1996 14:15:09 +0000 (14:15 +0000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 21 Aug 1996 14:15:09 +0000 (14:15 +0000)
milliseconds instead of 30 seconds as was intended. Thanks to Paul
Nelson for finding this bug.
(This used to be commit 78f62c83be5df6b66aa0b5e83b2d290f97ce53c2)

source3/include/smb.h
source3/smbd/ipc.c
source3/smbd/trans2.c

index 7e002122cc767f9c4f08b42e69eeec7b0daced72..f5d35d5261e24e592f2ac6ad50f182dcda53b9be 100644 (file)
@@ -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
index 920284fc9f964cf5ba7ca74024e488d9d4837088..dd9b9661ae8e99cc424bd72d53cd87903da8c7fe 100644 (file)
@@ -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"));
index 321dabc72cf280b976ad31b7aa39e7c99c817969..9b5419010e2d68a5a09089c4e8b07ff11df6feb0 100644 (file)
@@ -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);