mirror of https://github.com/aria2/aria2
2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed cuid as cuid_t in DefaultBtMessageDispatcher. * src/DefaultBtMessageDispatcher.cc * src/DefaultBtMessageDispatcher.hpull/1/head
parent
03417e94b4
commit
9a67929d8c
|
@ -1,3 +1,9 @@
|
|||
2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Renamed cuid as cuid_t in DefaultBtMessageDispatcher.
|
||||
* src/DefaultBtMessageDispatcher.cc
|
||||
* src/DefaultBtMessageDispatcher.h
|
||||
|
||||
2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Use format specifier %lld for cuid_t. Defined cuid_t as long long
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
namespace aria2 {
|
||||
|
||||
DefaultBtMessageDispatcher::DefaultBtMessageDispatcher()
|
||||
: cuid(0),
|
||||
: cuid_(0),
|
||||
messageFactory_(0),
|
||||
requestGroupMan_(0),
|
||||
requestTimeout_(0)
|
||||
|
@ -175,7 +175,7 @@ void DefaultBtMessageDispatcher::doAbortOutstandingRequestAction
|
|||
std::deque<RequestSlot>::iterator last =
|
||||
std::lower_bound(requestSlots_.begin(), requestSlots_.end(), rs);
|
||||
|
||||
std::for_each(first, last, AbortOutstandingRequest(piece, cuid));
|
||||
std::for_each(first, last, AbortOutstandingRequest(piece, cuid_));
|
||||
requestSlots_.erase(first, last);
|
||||
|
||||
BtAbortOutstandingRequestEvent event(piece);
|
||||
|
@ -237,7 +237,7 @@ public:
|
|||
void DefaultBtMessageDispatcher::doChokedAction()
|
||||
{
|
||||
std::for_each(requestSlots_.begin(), requestSlots_.end(),
|
||||
ProcessChokedRequestSlot(cuid, peer_, pieceStorage_));
|
||||
ProcessChokedRequestSlot(cuid_, peer_, pieceStorage_));
|
||||
|
||||
requestSlots_.erase(std::remove_if(requestSlots_.begin(), requestSlots_.end(),
|
||||
FindChokedRequestSlot(peer_)),
|
||||
|
@ -333,7 +333,7 @@ public:
|
|||
void DefaultBtMessageDispatcher::checkRequestSlotAndDoNecessaryThing()
|
||||
{
|
||||
std::for_each(requestSlots_.begin(), requestSlots_.end(),
|
||||
ProcessStaleRequestSlot(cuid,
|
||||
ProcessStaleRequestSlot(cuid_,
|
||||
peer_,
|
||||
pieceStorage_,
|
||||
this,
|
||||
|
@ -401,7 +401,7 @@ void DefaultBtMessageDispatcher::removeOutstandingRequest
|
|||
std::deque<RequestSlot>::iterator i =
|
||||
std::lower_bound(requestSlots_.begin(), requestSlots_.end(), slot);
|
||||
if(i != requestSlots_.end() && (*i) == slot) {
|
||||
AbortOutstandingRequest(slot.getPiece(), cuid)(*i);
|
||||
AbortOutstandingRequest(slot.getPiece(), cuid_)(*i);
|
||||
requestSlots_.erase(i);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ class RequestGroupMan;
|
|||
|
||||
class DefaultBtMessageDispatcher : public BtMessageDispatcher {
|
||||
private:
|
||||
cuid_t cuid;
|
||||
cuid_t cuid_;
|
||||
std::deque<SharedHandle<BtMessage> > messageQueue_;
|
||||
std::deque<RequestSlot> requestSlots_;
|
||||
SharedHandle<DownloadContext> downloadContext_;
|
||||
|
@ -134,10 +134,11 @@ public:
|
|||
|
||||
void setCuid(cuid_t cuid)
|
||||
{
|
||||
this->cuid = cuid;
|
||||
cuid_ = cuid;
|
||||
}
|
||||
|
||||
void setRequestTimeout(time_t requestTimeout) {
|
||||
void setRequestTimeout(time_t requestTimeout)
|
||||
{
|
||||
requestTimeout_ = requestTimeout;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue