Quellcode durchsuchen

very partial fix for #21, will handle any folder whose listing is smaller than ~63K

Julien 'Lta' BALLET vor 10 Jahren
Ursprung
Commit
c8491a7126
2 geänderte Dateien mit 6 neuen und 2 gelöschten Zeilen
  1. 1 1
      include/bdsm/smb_defs.h
  2. 5 1
      src/smb_trans2.c

+ 1 - 1
include/bdsm/smb_defs.h

@@ -26,7 +26,7 @@
 
 #include <bdsm/smb_packets.h>
 
-#define SMB_IO_BUFSIZE    8192
+#define SMB_IO_BUFSIZE    (2 >> 16)
 
 enum
 {

+ 5 - 1
src/smb_trans2.c

@@ -97,7 +97,11 @@ static smb_message *smb_tr2_recv(smb_session *s)
         if (remaining)
         {
             tr2   = (smb_trans2_resp *)recv.packet->payload;
-            smb_message_append(res, tr2->payload + 2 /*pad*/, tr2->data_count);
+            /*
+             * XXX: Why does padding was necessary and is not anymore, i.e.
+             * find a reproductible setup where it is
+             */
+            smb_message_append(res, tr2->payload /* + 2 pad */, tr2->data_count);
             remaining = (int)tr2->total_data_count -
                         (tr2->data_displacement + tr2->data_count);
         }