- fix a bug handling readraw packets that caused the timeout to be 30
[kai/samba.git] / source3 / smbd / trans2.c
index 60e9ae2b29424e9d430dd2516e8445941fad5a10..9b5419010e2d68a5a09089c4e8b07ff11df6feb0 100644 (file)
@@ -22,7 +22,6 @@
 */
 
 #include "includes.h"
 */
 
 #include "includes.h"
-#include "loadparm.h"
 #include "trans2.h"
 
 extern int DEBUGLEVEL;
 #include "trans2.h"
 
 extern int DEBUGLEVEL;
@@ -1555,10 +1554,8 @@ int reply_trans2(char *inbuf,char *outbuf,int length,int bufsize)
 
       while( num_data_sofar < total_data || num_params_sofar < total_params)
        {
 
       while( num_data_sofar < total_data || num_params_sofar < total_params)
        {
-         receive_smb(Client,inbuf, 0);
-         
-         /* Ensure this is still a trans2 packet (sanity check) */
-         if(CVAL(inbuf, smb_com) != SMBtranss2)
+         if(!receive_smb(Client,inbuf, SMB_SECONDARY_WAIT) ||
+            CVAL(inbuf, smb_com) != SMBtranss2)
            {
              outsize = set_message(outbuf,0,0,True);
              DEBUG(2,("Invalid secondary trans2 packet\n"));
            {
              outsize = set_message(outbuf,0,0,True);
              DEBUG(2,("Invalid secondary trans2 packet\n"));