X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9655ec028f79daba0402d0880658a7e1e59c999d..e733c4ce1e24cf7e4b0b0d8362fc59aaa7a7641c:/src/common/ftp.cpp diff --git a/src/common/ftp.cpp b/src/common/ftp.cpp index 218fa45784..c205cd7592 100644 --- a/src/common/ftp.cpp +++ b/src/common/ftp.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: common/ftp.cpp +// Name: src/common/ftp.cpp // Purpose: FTP protocol // Author: Guilhem Lavaux // Modified by: Mark Johnson, wxWindows@mj10777.de @@ -9,7 +9,6 @@ // robust Abort(), support for arbitrary FTP commands, ...) // Randall Fox (support for active mode) // Created: 07/07/1997 -// RCS-ID: $Id$ // Copyright: (c) 1997, 1998 Guilhem Lavaux // (c) 1998-2004 wxWidgets team // Licence: wxWindows licence @@ -48,9 +47,7 @@ #include "wx/protocol/protocol.h" #include "wx/protocol/ftp.h" -#ifndef __MWERKS__ - #include -#endif +#include // ---------------------------------------------------------------------------- // constants @@ -203,8 +200,7 @@ wxSocketBase *wxFTP::AcceptIfActive(wxSocketBase *sock) { m_lastError = wxPROTO_CONNERR; wxLogError(_("Timeout while waiting for FTP server to connect, try passive mode.")); - delete sock; - sock = NULL; + wxDELETE(sock); } else { @@ -588,9 +584,9 @@ wxSocketBase *wxFTP::GetActivePort() addrNew.Service(0); // pick an open port number. wxSocketServer *sockSrv = new wxSocketServer(addrNew); - if (!sockSrv->Ok()) + if (!sockSrv->IsOk()) { - // We use Ok() here to see if everything is ok + // We use IsOk() here to see if everything is ok m_lastError = wxPROTO_PROTERR; delete sockSrv; return NULL; @@ -687,7 +683,7 @@ public: // when checking the result, the stream will // almost always show an error, even if the file was - // properly transfered, thus, lets just grab the result + // properly transferred, thus, let's just grab the result // we are looking for "226 transfer completed" char code = m_ftp->GetResult(); @@ -903,7 +899,7 @@ int wxFTP::GetFileSize(const wxString& fileName) int filesize = -1; - // Check for existance of file via wxFTP::FileExists(...) + // Check for existence of file via wxFTP::FileExists(...) if ( FileExists(fileName) ) { wxString command; @@ -940,7 +936,7 @@ int wxFTP::GetFileSize(const wxString& fileName) } // Set transfermode back to the original. Only the "SIZE"-command - // is dependant on transfermode + // is dependent on transfermode if ( oldTransfermode != NONE ) { SetTransferMode(oldTransfermode);