diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-03-11 01:47:36 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-03-11 01:47:36 +0000 |
commit | 377ae59c21215473cf05e3cb8a86eb14c9e7715c (patch) | |
tree | a8cb48901c3c30bc1c2ddfd5d8b2d0cab7c6c95d /indra/llmessage/llxfermanager.cpp | |
parent | 9d12bd5e273b8cb032e25574461a8b4528d96343 (diff) |
merge Branch_1-19-1-Viewer -r 80930 : 81609 -> release
DEV-11202: Unhandled Excpetion in pipeline.cpp.
Merged over updated windlight ui help text from windlight14.
Reverting a const change in a virtual that was not propagated to all overrides.
DEV-10957 stop and pause Media and music buttons do not work
DEV-10762 Displayed page in the client browser disappears when crossing property boundaries.
DEV-11220 replace misspellings in alerts.xml parameters of 'messsage'
DEV-11221 fix a misspelling of 'participants' in floater_chat_history.xml tooltip
DEV-11193 clean up some viewer strings related to Windlight help text
svn merge -r81144:81147 svn+ssh://svn/svn/linden/branches/1-19-1-viewer-threads
DEV-11110 Media browser history dropdown does not save items across sessions
Ran the xuiparse -process tool on all en-us xml files. This does NOT change any data, merely reorders attributes and cleans up tab/spacing.
DEV-11349 XML CLEANUP: fix duplicate sibling names in en-us xui files
DEV-11348 Change to llmimetypes.cpp broke Media Type dropdown
dev-10623 "parcels that played movies no longer work in combo-merge-ui"
DEV-11379 - crash in LLTabContainer::draw()
DEV-11377 Elminiate dangerous LLLinkedList and LLDoubleLinkedList from newview
DEV-11158 sculpties on the top10 crash list
DEV-11404 "Send Current URL to Parcel" does not set the MIME type
merge 80958:80959 maint-ui-9-qa, DEV-11105 -- Searching for people with 3 characters like "j l" hurts the database.
DEV-10489: no draw distance cheating
DEV-879: water noise frequency
DEV-10764: macbook air support
DEV-10878: Linux Intel945 support
DEV-7551: featuretable adjustments for framerate.
DEV-11426 Enormous mini-map.
DEV-11505 - Crash in gunzip_file.
Removed final LinkedList, SkipMap, and AssocList templates from the Viewer!
DEV-11115 truncated word in the Advanced Water Editor's modal help dialog
Diffstat (limited to 'indra/llmessage/llxfermanager.cpp')
-rw-r--r-- | indra/llmessage/llxfermanager.cpp | 46 |
1 files changed, 30 insertions, 16 deletions
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(); } } } |