This commit is contained in:
mysticbbs 2013-09-07 15:52:31 -04:00
parent 1bc9872f99
commit 76b42f6852
3 changed files with 9 additions and 41 deletions

View File

@ -35,7 +35,6 @@ Function FileCopy (Source, Target: String) : Boolean;
Function FileFind (FN: String) : String;
Function FileByteSize (FN: String) : Int64;
Function FileNewExt (FN, NewExt: String) : String;
Procedure FileAppend (F1, F2: String);
{ GLOBAL FILEIO VARIABLES AND CONSTANTS }
@ -562,39 +561,6 @@ Begin
Result := FN + '.' + NewExt;
End;
Procedure FileAppend (F1, F2: String);
Var
BufIn,
BufOut : Array[1..8*1024] of Char;
TF1 : Text;
TF2 : Text;
Str : String;
Begin
Assign (TF1, F1);
{$I-} Reset(TF1); {$I+}
If IoResult <> 0 Then Exit;
SetTextBuf (TF1, BufIn);
Assign (TF2, F2);
{$I-} Append(TF2); {$I+}
If (IoResult = 2) Then
ReWrite (TF2);
SetTextBuf (TF2, BufOut);
While Not Eof(TF1) Do Begin
ReadLn (TF1, Str);
WriteLn (TF2, Str);
End;
Close (TF1);
Close (TF2);
End;
{ FILE STREAMING FUNCTIONS }
Constructor TFileBuffer.Create (BufferSize: LongInt);

View File

@ -54,6 +54,8 @@ Begin
If Client.FSocketHandle = -1 Then Exit;
WriteLn ('DEBUG SEND ' + Str);
Client.PurgeInputData(1);
Client.WriteLine(Str);
@ -89,6 +91,8 @@ Begin
Until Copy(Str, 1, 4) = strI2S(ResponseType) + ' ';
End;
End;
writeln('DEBUG RECV ' + ResponseStr);
End;
End.

View File

@ -75,16 +75,12 @@ Begin
WaitSock.WaitInit(NetInterface, DataPort);
DataSocket := NIL;
DataSocket := WaitSock.WaitConnection(10000);
If Not Assigned(DataSocket) Then Begin
WaitSock.Free;
Exit;
End;
WaitSock.Free;
If Not Assigned(DataSocket) Then
Exit;
End;
Result := True;
@ -164,6 +160,8 @@ Begin
If Not FileExist(FileName) Then Exit;
WriteLn ('DEBUG SendFile Passive ', Passive, ' Filename ', FileName);
SetPassive(Passive);
Client.WriteLine ('STOR ' + JustFile(FileName));