X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/58c837a4e67c0996134cc0947691dc09c5f26687..b97f6d757bd2a52aec7d30b8635dee9f78b65786:/src/common/ftp.cpp diff --git a/src/common/ftp.cpp b/src/common/ftp.cpp index 0ff2dfda36..829d4bf212 100644 --- a/src/common/ftp.cpp +++ b/src/common/ftp.cpp @@ -32,10 +32,7 @@ #include #include "wx/string.h" #include "wx/utils.h" -// #include "wx/data.h" -#define WXSOCK_INTERNAL #include "wx/sckaddr.h" -#undef WXSOCK_INTERNAL #include "wx/socket.h" #include "wx/url.h" #include "wx/sckstrm.h" @@ -48,10 +45,8 @@ #define FTP_BSIZE 1024 -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxFTP, wxProtocol) IMPLEMENT_PROTOCOL(wxFTP, wxT("ftp"), wxT("ftp"), TRUE) -#endif //////////////////////////////////////////////////////////////// ////// wxFTP constructor and destructor //////////////////////// @@ -69,7 +64,7 @@ wxFTP::wxFTP() m_passwd += wxGetHostName(); SetNotify(0); - SetFlags(NONE); + SetFlags(wxSOCKET_NONE); } wxFTP::~wxFTP() @@ -131,8 +126,9 @@ bool wxFTP::Close() m_lastError = wxPROTO_STREAMING; return FALSE; } - if (m_connected) + if (IsConnected()) SendCommand(wxString(wxT("QUIT")), '2'); + return wxSocketClient::Close(); } @@ -352,7 +348,7 @@ wxInputStream *wxFTP::GetInputStream(const wxString& path) in_stream->m_ftpsize = wxAtoi(WXSTRINGCAST str_size); } - sock->SetFlags(WAITALL); + sock->SetFlags(wxSOCKET_WAITALL); return in_stream; }