summaryrefslogtreecommitdiff
path: root/indra/llmessage/lltransfermanager.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-10-04 15:36:52 -0400
committerMonty Brandenberg <monty@lindenlab.com>2013-10-04 15:36:52 -0400
commit6f5790da38b3005292d3dbeaad778ea740110e33 (patch)
treeb28ce7a7a158f72f4dbfda60bafff2317c671837 /indra/llmessage/lltransfermanager.cpp
parent56e2f11417183d8dcc3d681f79fc63446b236abb (diff)
parentf7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff)
Merge. Pull in viewer-release after 3.6.7 release.
Diffstat (limited to 'indra/llmessage/lltransfermanager.cpp')
-rwxr-xr-xindra/llmessage/lltransfermanager.cpp60
1 files changed, 37 insertions, 23 deletions
diff --git a/indra/llmessage/lltransfermanager.cpp b/indra/llmessage/lltransfermanager.cpp
index 034680caf8..38b743fb75 100755
--- a/indra/llmessage/lltransfermanager.cpp
+++ b/indra/llmessage/lltransfermanager.cpp
@@ -606,16 +606,21 @@ void LLTransferManager::processTransferAbort(LLMessageSystem *msgp, void **)
void LLTransferManager::reliablePacketCallback(void **user_data, S32 result)
{
LLUUID *transfer_idp = (LLUUID *)user_data;
- if (result)
+ if (result &&
+ transfer_idp != NULL)
{
- llwarns << "Aborting reliable transfer " << *transfer_idp << " due to failed reliable resends!" << llendl;
LLTransferSource *tsp = gTransferManager.findTransferSource(*transfer_idp);
if (tsp)
{
+ llwarns << "Aborting reliable transfer " << *transfer_idp << " due to failed reliable resends!" << llendl;
LLTransferSourceChannel *tscp = tsp->mChannelp;
tsp->abortTransfer();
tscp->deleteTransfer(tsp);
}
+ else
+ {
+ llwarns << "Aborting reliable transfer " << *transfer_idp << " but can't find the LLTransferSource object" << llendl;
+ }
}
delete transfer_idp;
}
@@ -892,22 +897,26 @@ LLTransferSource *LLTransferSourceChannel::findTransferSource(const LLUUID &tran
}
-BOOL LLTransferSourceChannel::deleteTransfer(LLTransferSource *tsp)
+void LLTransferSourceChannel::deleteTransfer(LLTransferSource *tsp)
{
-
- LLPriQueueMap<LLTransferSource *>::pqm_iter iter;
- for (iter = mTransferSources.mMap.begin(); iter != mTransferSources.mMap.end(); iter++)
+ if (tsp)
{
- if (iter->second == tsp)
+ LLPriQueueMap<LLTransferSource *>::pqm_iter iter;
+ for (iter = mTransferSources.mMap.begin(); iter != mTransferSources.mMap.end(); iter++)
{
- delete tsp;
- mTransferSources.mMap.erase(iter);
- return TRUE;
+ if (iter->second == tsp)
+ {
+ delete tsp;
+ mTransferSources.mMap.erase(iter);
+ return;
+ }
}
- }
- llerrs << "Unable to find transfer source to delete!" << llendl;
- return FALSE;
+ llwarns << "Unable to find transfer source id "
+ << tsp->getID()
+ << " to delete!"
+ << llendl;
+ }
}
@@ -1008,21 +1017,26 @@ LLTransferTarget *LLTransferTargetChannel::findTransferTarget(const LLUUID &tran
}
-BOOL LLTransferTargetChannel::deleteTransfer(LLTransferTarget *ttp)
+void LLTransferTargetChannel::deleteTransfer(LLTransferTarget *ttp)
{
- tt_iter iter;
- for (iter = mTransferTargets.begin(); iter != mTransferTargets.end(); iter++)
+ if (ttp)
{
- if (*iter == ttp)
+ tt_iter iter;
+ for (iter = mTransferTargets.begin(); iter != mTransferTargets.end(); iter++)
{
- delete ttp;
- mTransferTargets.erase(iter);
- return TRUE;
+ if (*iter == ttp)
+ {
+ delete ttp;
+ mTransferTargets.erase(iter);
+ return;
+ }
}
- }
- llerrs << "Unable to find transfer target to delete!" << llendl;
- return FALSE;
+ llwarns << "Unable to find transfer target id "
+ << ttp->getID()
+ << " to delete!"
+ << llendl;
+ }
}