;;; -*- Mode:Lisp; Readtable:CL; Package:USER; Base:10; Patch-File:T -*-
;;; Patch file for System version 126.134
;;; Reason:
;;;  Fix typo in previous FTP patch.  Syptom: server FTP wouldn't store a
;;;  file on local machine when asked by remote user program. Caused access
;;;  550 error.
;;; Written 28-Oct-88 16:53:21 by keith at site Gigamos Cambridge
;;; while running on James Brown from band 1
;;; with Experimental System 126.132, Experimental ZWEI 126.27, Experimental ZMail 74.13, Experimental Local-File 76.0, Experimental File-Server 25.0, Experimental Unix-Interface 14.0, Experimental Tape 25.1, Experimental Lambda-Diag 18.0, Microcode 1762, SDU Boot Tape 3.14, SDU ROM 102, Lambda/Falcon Development System.



; From modified file DJ: L.NETWORK.IP-TCP.SERVER; FTP.LISP#86 at 28-Oct-88 16:53:21
#10R FTP#: 
(COMPILER-LET ((*PACKAGE* (GLOBAL:PKG-FIND-PACKAGE "FTP")))
  (COMPILER::PATCH-SOURCE-FILE "SYS: NETWORK; IP-TCP; SERVER; FTP  "

(defun ftp-store-1 (state pn mode &aux os is)
  "Write a file to the local TCP host (modulo chaosnet file servers)
    Mode can be any keyword acceptable for the :IF-EXISTS option to OPEN."
  (setq os (open pn
		 ;; ||| Added the (or ........ :default) wrapper
		 ;; ||| to cause either ascii mode or the default mode to happen JIM 10/27/88
		 :characters (or (eq (ftpstate-transfer-type state) :ascii)
				 :default)
		 :byte-size (ftpstate-byte-size state)
		 :if-exists mode
;;; not used, so commented out for release 3.0, should implement this
;;; in our local file system then use it.
;;;	:ESTIMATED-LENGTH (PROG1 (FTPSTATE-ESTIMATED-LENGTH STATE)  
;;;			      (SETF (FTPSTATE-ESTIMATED-LENGTH STATE) NIL))
		 
		 :direction :output))
  (setq is (get-ftp-data-connection state
				    (send os :send-if-handles :truename)
				    nil
				    :input))
  (when (streamp is)
    (ftp-receive-data state is os)))

))
