From 390f3a65d7bf72d2f4d4df071316751dd46fb8f8 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Sat, 13 Jul 2013 08:50:07 +0000 Subject: [PATCH] FTPc: fixed passive command broken in #3814 git-svn-id: svn://kolibrios.org@3821 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/ftpc/ftpc.asm | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/programs/network/ftpc/ftpc.asm b/programs/network/ftpc/ftpc.asm index 1e2e81d36a..066d0f904e 100644 --- a/programs/network/ftpc/ftpc.asm +++ b/programs/network/ftpc/ftpc.asm @@ -21,9 +21,10 @@ STATUS_CONNECTED = 1 STATUS_NEEDPASSWORD = 2 STATUS_LOGGED_IN = 3 -OPERATION_LIST = 0 -OPERATION_RETR = 1 -OPERATION_STOR = 2 +OPERATION_NONE = 0 +OPERATION_LIST = 1 +OPERATION_RETR = 2 +OPERATION_STOR = 3 use32 ; standard header @@ -287,9 +288,7 @@ open_dataconnection: ; only passive for now.. cmp [status], STATUS_LOGGED_IN jne .fail - mov dword[s], "PASV" - mov word[s+4], 0x0a0d - mcall send, [socketnum], s, 6, 0 + mcall send, [socketnum], str_PASV, str_PASV.length, 0 ret .fail: @@ -329,7 +328,7 @@ exit: ; data 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 'Please enter ftp server address.',10,0 @@ -365,6 +364,12 @@ str_help db "available commands:",10 db "stor - store file on the server",10 db 10,0 + +; FTP strings + +str_PASV db 'PASV',13,10 +.length = $ - str_PASV + sockaddr1: dw AF_INET4 .port dw 0x1500 ; 21