From ff42e557848158d5a01cc260bac0bbf974650934 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 24 Apr 2015 10:06:30 -0400 Subject: DRTVWR-397 WIP - comments and logging --- indra/newview/llattachmentsmgr.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/indra/newview/llattachmentsmgr.cpp b/indra/newview/llattachmentsmgr.cpp index 39c21a195a..799a25ddc9 100755 --- a/indra/newview/llattachmentsmgr.cpp +++ b/indra/newview/llattachmentsmgr.cpp @@ -132,6 +132,9 @@ void LLAttachmentsMgr::requestAttachments(attachments_vec_t& attachment_requests return; } + // For unknown reasons, requesting many attachments at once causes + // frequent server-side failures. Here we're limiting the number + // of attachments requested per idle loop. const S32 max_objects_per_request = 5; S32 obj_count = llmin((S32)attachment_requests.size(),max_objects_per_request); if (obj_count == 0) @@ -147,7 +150,6 @@ void LLAttachmentsMgr::requestAttachments(attachments_vec_t& attachment_requests { LL_WARNS() << "ATT Too many attachments requested: " << obj_count << " exceeds limit of " << MAX_OBJECTS_TO_SEND << LL_ENDL; - LL_WARNS() << "ATT Excess requests will be ignored" << LL_ENDL; obj_count = MAX_OBJECTS_TO_SEND; } @@ -159,8 +161,10 @@ void LLAttachmentsMgr::requestAttachments(attachments_vec_t& attachment_requests compound_msg_id.generate(); LLMessageSystem* msg = gMessageSystem; - // by construction, obj_count <= attachment_requests.size(), so no - // check against empty() is needed here. + // by construction above, obj_count <= attachment_requests.size(), so no + // check against attachment_requests.empty() is needed. + llassert(obj_count <= attachment_requests.size()); + for (S32 i=0; i