diff options
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llcircuit.h | 1 | ||||
-rw-r--r-- | indra/llmessage/llcurl.cpp | 1 | ||||
-rw-r--r-- | indra/llmessage/llnamevalue.h | 1 | ||||
-rw-r--r-- | indra/llmessage/llpacketring.h | 1 | ||||
-rw-r--r-- | indra/llmessage/llxfermanager.cpp | 46 | ||||
-rw-r--r-- | indra/llmessage/llxfermanager.h | 4 | ||||
-rw-r--r-- | indra/llmessage/message.h | 2 |
7 files changed, 33 insertions, 23 deletions
diff --git a/indra/llmessage/llcircuit.h b/indra/llmessage/llcircuit.h index 1a6611f5d4..8824e6825a 100644 --- a/indra/llmessage/llcircuit.h +++ b/indra/llmessage/llcircuit.h @@ -37,7 +37,6 @@ #include <vector> #include "llerror.h" -#include "linked_lists.h" #include "lltimer.h" #include "timing.h" diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 8afcb6ba4f..8b9a45ff3f 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -121,6 +121,7 @@ void LLCurl::Responder::error(U32 status, const std::string& reason) // virtual void LLCurl::Responder::result(const LLSD& content) { + llwarns << "Virtual Function not implemented" << llendl; } // virtual diff --git a/indra/llmessage/llnamevalue.h b/indra/llmessage/llnamevalue.h index 1bdfeb2365..7a4c80f3f3 100644 --- a/indra/llmessage/llnamevalue.h +++ b/indra/llmessage/llnamevalue.h @@ -33,7 +33,6 @@ #define LL_LLNAMEVALUE_H #include "string_table.h" -#include "llskipmap.h" #include "llmath.h" #include "v3math.h" #include "lldbstrings.h" diff --git a/indra/llmessage/llpacketring.h b/indra/llmessage/llpacketring.h index 109d5e60dd..0e1450ac1b 100644 --- a/indra/llmessage/llpacketring.h +++ b/indra/llmessage/llpacketring.h @@ -36,7 +36,6 @@ #include <queue> #include "llpacketbuffer.h" -#include "linked_lists.h" #include "llhost.h" #include "net.h" #include "llthrottle.h" diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp index c4dd3406b4..a612e181cd 100644 --- a/indra/llmessage/llxfermanager.cpp +++ b/indra/llmessage/llxfermanager.cpp @@ -90,8 +90,9 @@ void LLXferManager::free () { LLXfer *xferp; LLXfer *delp; - - mOutgoingHosts.deleteAllData(); + + for_each(mOutgoingHosts.begin(), mOutgoingHosts.end(), DeletePointer()); + mOutgoingHosts.clear(); delp = mSendList; while (delp) @@ -155,12 +156,15 @@ void LLXferManager::updateHostStatus() LLXfer *xferp; LLHostStatus *host_statusp = NULL; - mOutgoingHosts.deleteAllData(); + for_each(mOutgoingHosts.begin(), mOutgoingHosts.end(), DeletePointer()); + mOutgoingHosts.clear(); for (xferp = mSendList; xferp; xferp = xferp->mNext) { - for (host_statusp = mOutgoingHosts.getFirstData(); host_statusp; host_statusp = mOutgoingHosts.getNextData()) + for (status_list_t::iterator iter = mOutgoingHosts.begin(); + iter != mOutgoingHosts.end(); ++iter) { + host_statusp = *iter; if (host_statusp->mHost == xferp->mRemoteHost) { break; @@ -172,7 +176,7 @@ void LLXferManager::updateHostStatus() if (host_statusp) { host_statusp->mHost = xferp->mRemoteHost; - mOutgoingHosts.addData(host_statusp); + mOutgoingHosts.push_front(host_statusp); } } if (host_statusp) @@ -195,12 +199,14 @@ void LLXferManager::updateHostStatus() void LLXferManager::printHostStatus() { LLHostStatus *host_statusp = NULL; - if (mOutgoingHosts.getFirstData()) + if (!mOutgoingHosts.empty()) { llinfos << "Outgoing Xfers:" << llendl; - for (host_statusp = mOutgoingHosts.getFirstData(); host_statusp; host_statusp = mOutgoingHosts.getNextData()) + for (status_list_t::iterator iter = mOutgoingHosts.begin(); + iter != mOutgoingHosts.end(); ++iter) { + host_statusp = *iter; llinfos << " " << host_statusp->mHost << " active: " << host_statusp->mNumActive << " pending: " << host_statusp->mNumPending << llendl; } } @@ -275,8 +281,10 @@ S32 LLXferManager::numPendingXfers(const LLHost &host) { LLHostStatus *host_statusp = NULL; - for (host_statusp = mOutgoingHosts.getFirstData(); host_statusp; host_statusp = mOutgoingHosts.getNextData()) + for (status_list_t::iterator iter = mOutgoingHosts.begin(); + iter != mOutgoingHosts.end(); ++iter) { + host_statusp = *iter; if (host_statusp->mHost == host) { return (host_statusp->mNumPending); @@ -291,8 +299,10 @@ S32 LLXferManager::numActiveXfers(const LLHost &host) { LLHostStatus *host_statusp = NULL; - for (host_statusp = mOutgoingHosts.getFirstData(); host_statusp; host_statusp = mOutgoingHosts.getNextData()) + for (status_list_t::iterator iter = mOutgoingHosts.begin(); + iter != mOutgoingHosts.end(); ++iter) { + host_statusp = *iter; if (host_statusp->mHost == host) { return (host_statusp->mNumActive); @@ -307,8 +317,10 @@ void LLXferManager::changeNumActiveXfers(const LLHost &host, S32 delta) { LLHostStatus *host_statusp = NULL; - for (host_statusp = mOutgoingHosts.getFirstData(); host_statusp; host_statusp = mOutgoingHosts.getNextData()) + for (status_list_t::iterator iter = mOutgoingHosts.begin(); + iter != mOutgoingHosts.end(); ++iter) { + host_statusp = *iter; if (host_statusp->mHost == host) { host_statusp->mNumActive += delta; @@ -1010,15 +1022,15 @@ void LLXferManager::startPendingDownloads() // stateful iteration, it would be possible for old requests to // never start. LLXfer* xferp = mReceiveList; - LLLinkedList<LLXfer> pending_downloads; + std::list<LLXfer*> pending_downloads; S32 download_count = 0; S32 pending_count = 0; while(xferp) { if(xferp->mStatus == e_LL_XFER_PENDING) { - ++pending_count; // getLength() is O(N), so track it here. - pending_downloads.addData(xferp); + ++pending_count; + pending_downloads.push_front(xferp); } else if(xferp->mStatus == e_LL_XFER_IN_PROGRESS) { @@ -1036,16 +1048,18 @@ void LLXferManager::startPendingDownloads() if((start_count > 0) && (pending_count > 0)) { S32 result; - xferp = pending_downloads.getFirstData(); - while(start_count-- && xferp) + for (std::list<LLXfer*>::iterator iter = pending_downloads.begin(); + iter != pending_downloads.end(); ++iter) { + xferp = *iter; + if (start_count-- <= 0) + break; result = xferp->startDownload(); if(result) { xferp->abort(result); ++start_count; } - xferp = pending_downloads.getNextData(); } } } diff --git a/indra/llmessage/llxfermanager.h b/indra/llmessage/llxfermanager.h index 5d213bbc71..c4af8fe937 100644 --- a/indra/llmessage/llxfermanager.h +++ b/indra/llmessage/llxfermanager.h @@ -45,7 +45,6 @@ class LLVFS; #include "llxfer.h" #include "message.h" #include "llassetstorage.h" -#include "linked_lists.h" #include "lldir.h" #include "lllinkedqueue.h" #include "llthrottle.h" @@ -101,7 +100,8 @@ class LLXferManager LLXfer *mSendList; LLXfer *mReceiveList; - LLLinkedList <LLHostStatus> mOutgoingHosts; + typedef std::list<LLHostStatus*> status_list_t; + status_list_t mOutgoingHosts; private: protected: diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h index 4debcddf99..61d34b7fc1 100644 --- a/indra/llmessage/message.h +++ b/indra/llmessage/message.h @@ -216,8 +216,6 @@ class LLMessageSystem LLPacketRing mPacketRing; LLReliablePacketParams mReliablePacketParams; - //LLLinkedList<LLPacketAck> mAckList; - // Set this flag to TRUE when you want *very* verbose logs. BOOL mVerboseLog; |