From 565e59a1b7a7aac856d1f997e20d07cfcf15c438 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Mon, 3 Sep 2012 10:26:04 +0200 Subject: [PATCH] Allow FTP lib to play nice with updated socket lib. --- lib/ftp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ftp.cpp b/lib/ftp.cpp index c3617848..25695dee 100644 --- a/lib/ftp.cpp +++ b/lib/ftp.cpp @@ -98,7 +98,8 @@ int FTP::User::ParseCommand( std::string Command ) { Connected = Passive.accept(); } fprintf( stderr, "Sending LIST information\n" ); - Connected.Send( MyDir.LIST( ActiveStreams ) ); + std::string tmpstr = MyDir.LIST( ActiveStreams ); + Connected.Send( tmpstr ); Connected.close( ); return 226; break; @@ -145,7 +146,8 @@ int FTP::User::ParseCommand( std::string Command ) { Connected = Passive.accept(); } fprintf( stderr, "Sending RETR information\n" ); - Connected.Send( MyDir.RETR( Command ) ); + std::string tmpstr = MyDir.RETR( Command ); + Connected.Send( tmpstr ); Connected.close(); return 226; break;