wxFTP::Close() shouldn't hide base wxSocket function
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -32,8 +32,8 @@ public:
|
|||||||
bool Connect(wxSockAddress& addr, bool wait = TRUE);
|
bool Connect(wxSockAddress& addr, bool wait = TRUE);
|
||||||
bool Connect(const wxString& host);
|
bool Connect(const wxString& host);
|
||||||
|
|
||||||
// [forcibly] close the connection
|
// close the connection
|
||||||
bool Close(bool force = FALSE);
|
virtual bool Close();
|
||||||
|
|
||||||
void SetUser(const wxString& user) { m_user = user; }
|
void SetUser(const wxString& user) { m_user = user; }
|
||||||
void SetPassword(const wxString& passwd) { m_passwd = passwd; }
|
void SetPassword(const wxString& passwd) { m_passwd = passwd; }
|
||||||
|
@@ -71,6 +71,11 @@ wxFTP::wxFTP()
|
|||||||
|
|
||||||
wxFTP::~wxFTP()
|
wxFTP::~wxFTP()
|
||||||
{
|
{
|
||||||
|
if ( m_streaming )
|
||||||
|
{
|
||||||
|
(void)Abort();
|
||||||
|
}
|
||||||
|
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,17 +127,12 @@ bool wxFTP::Connect(const wxString& host)
|
|||||||
return Connect(addr);
|
return Connect(addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFTP::Close(bool force)
|
bool wxFTP::Close()
|
||||||
{
|
{
|
||||||
if ( m_streaming )
|
if ( m_streaming )
|
||||||
{
|
{
|
||||||
if ( !force )
|
m_lastError = wxPROTO_STREAMING;
|
||||||
{
|
return FALSE;
|
||||||
m_lastError = wxPROTO_STREAMING;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
(void)Abort();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( IsConnected() )
|
if ( IsConnected() )
|
||||||
|
Reference in New Issue
Block a user