bug in ~wxOutputFTPStream which prevented multiple uploads fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -400,11 +400,23 @@ public:
|
|||||||
: wxSocketOutputStream(*sock), m_ftp(ftp_clt) {}
|
: wxSocketOutputStream(*sock), m_ftp(ftp_clt) {}
|
||||||
virtual ~wxOutputFTPStream(void)
|
virtual ~wxOutputFTPStream(void)
|
||||||
{
|
{
|
||||||
if (LastError() != wxStream_NOERROR)
|
if ( IsOk() )
|
||||||
m_ftp->GetResult('2');
|
{
|
||||||
else
|
// close data connection first, this will generate "transfer
|
||||||
m_ftp->Abort();
|
// completed" reply
|
||||||
delete m_o_socket;
|
delete m_o_socket;
|
||||||
|
|
||||||
|
// read this reply
|
||||||
|
m_ftp->GetResult('2');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// abort data connection first
|
||||||
|
m_ftp->Abort();
|
||||||
|
|
||||||
|
// and close it after
|
||||||
|
delete m_o_socket;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user