Use IsConnected instead of m_connected
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -32,10 +32,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
// #include "wx/data.h"
|
|
||||||
#define WXSOCK_INTERNAL
|
|
||||||
#include "wx/sckaddr.h"
|
#include "wx/sckaddr.h"
|
||||||
#undef WXSOCK_INTERNAL
|
|
||||||
#include "wx/socket.h"
|
#include "wx/socket.h"
|
||||||
#include "wx/url.h"
|
#include "wx/url.h"
|
||||||
#include "wx/sckstrm.h"
|
#include "wx/sckstrm.h"
|
||||||
@@ -67,7 +64,7 @@ wxFTP::wxFTP()
|
|||||||
m_passwd += wxGetHostName();
|
m_passwd += wxGetHostName();
|
||||||
|
|
||||||
SetNotify(0);
|
SetNotify(0);
|
||||||
SetFlags(NONE);
|
SetFlags(wxSOCKET_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFTP::~wxFTP()
|
wxFTP::~wxFTP()
|
||||||
@@ -129,8 +126,9 @@ bool wxFTP::Close()
|
|||||||
m_lastError = wxPROTO_STREAMING;
|
m_lastError = wxPROTO_STREAMING;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (m_connected)
|
if (IsConnected())
|
||||||
SendCommand(wxString(wxT("QUIT")), '2');
|
SendCommand(wxString(wxT("QUIT")), '2');
|
||||||
|
|
||||||
return wxSocketClient::Close();
|
return wxSocketClient::Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -350,7 +348,7 @@ wxInputStream *wxFTP::GetInputStream(const wxString& path)
|
|||||||
|
|
||||||
in_stream->m_ftpsize = wxAtoi(WXSTRINGCAST str_size);
|
in_stream->m_ftpsize = wxAtoi(WXSTRINGCAST str_size);
|
||||||
}
|
}
|
||||||
sock->SetFlags(WAITALL);
|
sock->SetFlags(wxSOCKET_WAITALL);
|
||||||
|
|
||||||
return in_stream;
|
return in_stream;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user