Diffstat (limited to 'core/launcher/transferserver.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/launcher/transferserver.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp index 4b764e3..c3f936e 100644 --- a/core/launcher/transferserver.cpp +++ b/core/launcher/transferserver.cpp | |||
@@ -760,50 +760,49 @@ void ServerPI::process( const QString& message ) | |||
760 | // noop (NOOP) | 760 | // noop (NOOP) |
761 | else if ( cmd == "NOOP" ) { | 761 | else if ( cmd == "NOOP" ) { |
762 | send( "200 Command okay" ); // No tr | 762 | send( "200 Command okay" ); // No tr |
763 | } | 763 | } |
764 | 764 | ||
765 | // not implemented | 765 | // not implemented |
766 | else | 766 | else |
767 | send( "502 Command not implemented" ); // No tr | 767 | send( "502 Command not implemented" ); // No tr |
768 | 768 | ||
769 | lastCommand = cmd; | 769 | lastCommand = cmd; |
770 | } | 770 | } |
771 | 771 | ||
772 | bool ServerPI::backupRestoreGzip( const QString &file ) | 772 | bool ServerPI::backupRestoreGzip( const QString &file ) |
773 | { | 773 | { |
774 | return (file.find( "backup" ) != -1 && // No tr | 774 | return (file.find( "backup" ) != -1 && // No tr |
775 | file.findRev( ".tgz" ) == (int)file.length()-4 ); | 775 | file.findRev( ".tgz" ) == (int)file.length()-4 ); |
776 | } | 776 | } |
777 | 777 | ||
778 | bool ServerPI::backupRestoreGzip( const QString &file, QStringList &targets ) | 778 | bool ServerPI::backupRestoreGzip( const QString &file, QStringList &targets ) |
779 | { | 779 | { |
780 | if ( file.find( "backup" ) != -1 && // No tr | 780 | if ( file.find( "backup" ) != -1 && // No tr |
781 | file.findRev( ".tgz" ) == (int)file.length()-4 ) { | 781 | file.findRev( ".tgz" ) == (int)file.length()-4 ) { |
782 | QFileInfo info( file ); | 782 | QFileInfo info( file ); |
783 | targets = info.dirPath( TRUE ); | 783 | targets = info.dirPath( TRUE ); |
784 | qDebug("ServerPI::backupRestoreGzip for %s = %s", file.latin1(), | 784 | odebug << "ServerPI::backupRestoreGzip for " << file.latin1() << " = " << targets.join(" ").latin1() << oendl; |
785 | targets.join(" ").latin1() ); | ||
786 | return true; | 785 | return true; |
787 | } | 786 | } |
788 | return false; | 787 | return false; |
789 | } | 788 | } |
790 | 789 | ||
791 | void ServerPI::sendFile( const QString& file ) | 790 | void ServerPI::sendFile( const QString& file ) |
792 | { | 791 | { |
793 | if ( passiv ) { | 792 | if ( passiv ) { |
794 | wait[SendFile] = TRUE; | 793 | wait[SendFile] = TRUE; |
795 | waitfile = file; | 794 | waitfile = file; |
796 | if ( waitsocket ) | 795 | if ( waitsocket ) |
797 | newConnection( waitsocket ); | 796 | newConnection( waitsocket ); |
798 | } | 797 | } |
799 | else { | 798 | else { |
800 | QStringList targets; | 799 | QStringList targets; |
801 | if ( backupRestoreGzip( file, targets ) ) | 800 | if ( backupRestoreGzip( file, targets ) ) |
802 | dtp->sendGzipFile( file, targets, peeraddress, peerport ); | 801 | dtp->sendGzipFile( file, targets, peeraddress, peerport ); |
803 | else dtp->sendFile( file, peeraddress, peerport ); | 802 | else dtp->sendFile( file, peeraddress, peerport ); |
804 | } | 803 | } |
805 | } | 804 | } |
806 | 805 | ||
807 | void ServerPI::retrieveFile( const QString& file ) | 806 | void ServerPI::retrieveFile( const QString& file ) |
808 | { | 807 | { |
809 | if ( passiv ) { | 808 | if ( passiv ) { |