]> gitweb.factorcode.org Git - factor.git/commitdiff
ftp.server: use C: for ftp-get and ftp-put.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 30 Nov 2014 16:43:50 +0000 (08:43 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 30 Nov 2014 16:43:50 +0000 (08:43 -0800)
basis/ftp/server/server.factor

index acd106d2de879eddc988c74de41704a33b8f015f..9458d5d3a662220162f39f70e784ed49380ebefe 100644 (file)
@@ -26,14 +26,10 @@ TUPLE: ftp-command raw tokenized ;
         swap tokenize >>tokenized ;
 
 TUPLE: ftp-get path ;
-: <ftp-get> ( path -- obj )
-    ftp-get new
-        swap >>path ;
+C: <ftp-get> ftp-get
 
 TUPLE: ftp-put path ;
-: <ftp-put> ( path -- obj )
-    ftp-put new
-        swap >>path ;
+C: <ftp-put> ftp-put
 
 TUPLE: ftp-list ;
 C: <ftp-list> ftp-list
@@ -81,6 +77,7 @@ C: <ftp-disconnect> ftp-disconnect
     } 1&& ;
 
 : ftp-error ( string -- ) 500 server-response ;
+
 : ftp-unimplemented ( string -- ) 502 server-response ;
 
 : send-banner ( -- )
@@ -370,4 +367,3 @@ M: ftp-server handle-client* ( server -- )
 
 ! sudo tcpdump -i en1 -A -s 10000  tcp port 21
 ! [2010-09-04T22:07:58-05:00] DEBUG server-response: 500:Unrecognized command: EPRT |2|0:0:0:0:0:0:0:1|59359|
-