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

Update new version: 3.15.02

File:
1 edited

Legend:

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

    r130 r3185  
    1010#include "servercapabilities.h"
    1111
     12#include <libfilezilla/util.hpp>
     13
    1214CTransferSocket::CTransferSocket(CFileZillaEnginePrivate & engine, CFtpControlSocket & controlSocket, TransferMode transferMode)
    13 : CEventHandler(controlSocket.event_loop_)
     15: fz::event_handler(controlSocket.event_loop_)
    1416, engine_(engine)
    1517, controlSocket_(controlSocket)
     
    2022CTransferSocket::~CTransferSocket()
    2123{
    22         RemoveHandler();
     24        remove_handler();
    2325        if (m_transferEndReason == TransferEndReason::none)
    2426                m_transferEndReason = TransferEndReason::successful;
     
    311313                }
    312314                else {
    313                         SendEvent<CSocketEvent>(m_pBackend, SocketEventType::read, 0);
     315                        send_event<CSocketEvent>(m_pBackend, SocketEventType::read, 0);
    314316                }
    315317        }
     
    412414        }
    413415        else if (written > 0) {
    414                 SendEvent<CSocketEvent>(m_pBackend, SocketEventType::write, 0);
     416                send_event<CSocketEvent>(m_pBackend, SocketEventType::write, 0);
    415417        }
    416418}
     
    574576        ResetSocket();
    575577
    576         engine_.SendEvent<CFileZillaEngineEvent>(engineTransferEnd);
     578        engine_.send_event<CFileZillaEngineEvent>(engineTransferEnd);
    577579}
    578580
     
    618620
    619621        if (start < low || start > high) {
    620                 start = GetRandomNumber(low, high);
     622                start = fz::random_number(low, high);
    621623                wxASSERT(start >= low && start <= high);
    622624        }
     
    704706{
    705707        bool res = ioThread_->Finalize(BUFFERSIZE - m_transferBufferLen);
     708        m_transferBufferLen = BUFFERSIZE;
     709
    706710        if (m_transferEndReason != TransferEndReason::none)
    707711                return;
     
    794798}
    795799
    796 void CTransferSocket::operator()(CEventBase const& ev)
    797 {
    798         Dispatch<CSocketEvent, CIOThreadEvent>(ev, this,
     800void CTransferSocket::operator()(fz::event_base const& ev)
     801{
     802        fz::dispatch<CSocketEvent, CIOThreadEvent>(ev, this,
    799803                &CTransferSocket::OnSocketEvent,
    800804                &CTransferSocket::OnIOThreadEvent);
Note: See TracChangeset for help on using the changeset viewer.