Ignore:
Timestamp:
Jan 9, 2017, 11:09:38 AM (3 years ago)
Author:
jrpelegrina
Message:

Update new version: 3.15.02

File:
1 edited

Legend:

Unmodified
Added
Removed
  • filezilla/trunk/fuentes/src/engine/httpcontrolsocket.cpp

    r130 r3185  
    44#include "engineprivate.h"
    55#include "httpcontrolsocket.h"
    6 #include "local_filesys.h"
    76#include "tlssocket.h"
     7
     8#include <libfilezilla/iputils.hpp>
     9#include <libfilezilla/local_filesys.hpp>
    810
    911#include <wx/file.h>
     
    9395CHttpControlSocket::~CHttpControlSocket()
    9496{
    95         RemoveHandler();
     97        remove_handler();
    9698        DoClose();
    9799        delete [] m_pRecvBuffer;
     
    345347
    346348        if (!localFile.empty()) {
    347                 pData->localFileSize = CLocalFileSystem::GetSize(pData->localFile);
     349                pData->localFileSize = fz::local_filesys::get_size(fz::to_native(pData->localFile));
    348350
    349351                pData->opState = filetransfer_waitfileexists;
     
    454456        pData->tls = tls;
    455457
    456         if (!IsIpAddress(host))
     458        if (fz::get_address_type(host.ToStdWstring()) == fz::address_type::unknown) {
    457459                LogMessage(MessageType::Status, _("Resolving address of %s"), host);
     460        }
    458461
    459462        pData->host = host;
     
    971974{
    972975        LogMessage(MessageType::Debug_Verbose, _T("CHttpControlSocket::SendNextCommand(%d)"), prevResult);
    973         if (!m_pCurOpData)
    974         {
     976        if (!m_pCurOpData) {
    975977                LogMessage(__TFILE__, __LINE__, this, MessageType::Debug_Warning, _T("SendNextCommand called without active operation"));
    976978                ResetOperation(FZ_REPLY_ERROR);
     
    997999}
    9981000
    999 int CHttpControlSocket::OpenFile( CHttpFileTransferOpData* pData)
     1001int CHttpControlSocket::OpenFile(CHttpFileTransferOpData* pData)
    10001002{
    10011003        delete pData->pFile;
     
    10031005        CreateLocalDir(pData->localFile);
    10041006
    1005         if (!pData->pFile->Open(pData->localFile, pData->resume ? wxFile::write_append : wxFile::write))
    1006         {
     1007        if (!pData->pFile->Open(pData->localFile, pData->resume ? wxFile::write_append : wxFile::write)) {
    10071008                LogMessage(MessageType::Error, _("Failed to open \"%s\" for writing"), pData->localFile);
    10081009                ResetOperation(FZ_REPLY_ERROR);
     
    10101011        }
    10111012        wxFileOffset end = pData->pFile->SeekEnd();
    1012         if( !end ) {
     1013        if (!end) {
    10131014                pData->resume = false;
    10141015        }
    1015         pData->localFileSize = CLocalFileSystem::GetSize(pData->localFile);
     1016        pData->localFileSize = fz::local_filesys::get_size(fz::to_native(pData->localFile));
    10161017        return FZ_REPLY_OK;
    10171018}
Note: See TracChangeset for help on using the changeset viewer.