From 903ae397ab5950a65ef1dce3eef82fc753c4234a Mon Sep 17 00:00:00 2001 From: tsdima Date: Tue, 15 Dec 2009 19:12:42 +0000 Subject: [PATCH] buffered output for LIST and NLST git-svn-id: svn://kolibrios.org@1323 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/ftps/trunk/FTPS.ASM | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/programs/network/ftps/trunk/FTPS.ASM b/programs/network/ftps/trunk/FTPS.ASM index 0013347aca..03938b5d61 100644 --- a/programs/network/ftps/trunk/FTPS.ASM +++ b/programs/network/ftps/trunk/FTPS.ASM @@ -851,6 +851,8 @@ pps002: ; ;*************************************************************************** sendDir: + mov eax, text+0x4000 + mov [fsize], eax mov ebx, dirinfoblock and dword [ebx+4], 0 ; start from zero block sd001: @@ -974,10 +976,24 @@ terminate: stosb ; Send the completed line to the user over data socket push esi + push edi mov esi, dirStr - mov edx, edi + mov ecx, edi + sub ecx, esi + mov edi, [fsize] + cld + rep movsb + mov [fsize], edi + cmp edi, text+0x4400 + jb @f + mov esi, text+0x4000 + mov edx, [fsize] sub edx, esi + mov [fsize], esi call outputDataStr + +@@: + pop edi pop esi sd003: ; Move to next entry in the block @@ -990,6 +1006,10 @@ sd004: jmp sd001 sd_exit: + mov esi, text+0x4000 + mov edx, [fsize] + sub edx, esi + call outputDataStr ret @@ -1145,6 +1165,7 @@ gf000: mov ecx, [DataSocket] mov edx, text + 0x1300 add edx, dword [fsize] + xor esi, esi mcall ; returned data len in eax add dword [fsize], eax