FTPc: fixed passive command broken in #3814

git-svn-id: svn://kolibrios.org@3821 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2013-07-13 08:50:07 +00:00
parent 691d8737bc
commit 390f3a65d7

View File

@ -21,9 +21,10 @@ STATUS_CONNECTED = 1
STATUS_NEEDPASSWORD = 2 STATUS_NEEDPASSWORD = 2
STATUS_LOGGED_IN = 3 STATUS_LOGGED_IN = 3
OPERATION_LIST = 0 OPERATION_NONE = 0
OPERATION_RETR = 1 OPERATION_LIST = 1
OPERATION_STOR = 2 OPERATION_RETR = 2
OPERATION_STOR = 3
use32 use32
; standard header ; standard header
@ -287,9 +288,7 @@ open_dataconnection: ; only passive for now..
cmp [status], STATUS_LOGGED_IN cmp [status], STATUS_LOGGED_IN
jne .fail jne .fail
mov dword[s], "PASV" mcall send, [socketnum], str_PASV, str_PASV.length, 0
mov word[s+4], 0x0a0d
mcall send, [socketnum], s, 6, 0
ret ret
.fail: .fail:
@ -329,7 +328,7 @@ exit:
; data ; data
str_title db 'FTP client',0 str_title db 'FTP client',0
str_welcome db 'FTP client for KolibriOS v0.09',10 str_welcome db 'FTP client for KolibriOS v0.10',10
db 10 db 10
db 'Please enter ftp server address.',10,0 db 'Please enter ftp server address.',10,0
@ -365,6 +364,12 @@ str_help db "available commands:",10
db "stor <file> - store file on the server",10 db "stor <file> - store file on the server",10
db 10,0 db 10,0
; FTP strings
str_PASV db 'PASV',13,10
.length = $ - str_PASV
sockaddr1: sockaddr1:
dw AF_INET4 dw AF_INET4
.port dw 0x1500 ; 21 .port dw 0x1500 ; 21