X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1489a2c037787abf291f883d63826369659f3970..f357c0d42c17bf5be30e65e68cd99c474678da71:/src/common/ftp.cpp diff --git a/src/common/ftp.cpp b/src/common/ftp.cpp index 6665963f88..8d34c443b3 100644 --- a/src/common/ftp.cpp +++ b/src/common/ftp.cpp @@ -32,7 +32,7 @@ #pragma hdrstop #endif -#if wxUSE_SOCKETS && wxUSE_STREAMS +#if wxUSE_PROTOCOL_FTP #ifndef WX_PRECOMP #include @@ -507,7 +507,7 @@ public: { delete m_i_socket; - if ( LastError() == wxStream_NOERROR ) + if ( IsOk() ) { // wait for "226 transfer completed" m_ftp->CheckResult('2'); @@ -524,6 +524,8 @@ public: wxFTP *m_ftp; size_t m_ftpsize; + + DECLARE_NO_COPY_CLASS(wxInputFTPStream) }; class wxOutputFTPStream : public wxSocketOutputStream @@ -558,6 +560,8 @@ public: } wxFTP *m_ftp; + + DECLARE_NO_COPY_CLASS(wxOutputFTPStream) }; wxSocketClient *wxFTP::GetPort() @@ -672,7 +676,7 @@ wxOutputStream *wxFTP::GetOutputStream(const wxString& path) wxString tmp_str = wxT("STOR ") + path; if ( !CheckCommand(tmp_str, '1') ) - return FALSE; + return NULL; m_streaming = TRUE; @@ -890,7 +894,7 @@ wxList *wxFTP::GetList(const wxString& wildcard, bool details) { wxSocketBase *sock = GetPort(); if (!sock) - return FALSE; + return NULL; wxList *file_list = new wxList; wxString line; // NLST : List of Filenames (including Directory's !) @@ -925,5 +929,5 @@ wxList *wxFTP::GetList(const wxString& wildcard, bool details) } #endif // WXWIN_COMPATIBILITY_2 -#endif - // wxUSE_SOCKETS +#endif // wxUSE_PROTOCOL_FTP +