Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
ff42e557
Commit
ff42e557
authored
10 years ago
by
Brad Payne (Vir Linden)
Browse files
Options
Downloads
Patches
Plain Diff
DRTVWR-397 WIP - comments and logging
parent
4d689fc5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llattachmentsmgr.cpp
+8
-4
8 additions, 4 deletions
indra/newview/llattachmentsmgr.cpp
with
8 additions
and
4 deletions
indra/newview/llattachmentsmgr.cpp
+
8
−
4
View file @
ff42e557
...
@@ -132,6 +132,9 @@ void LLAttachmentsMgr::requestAttachments(attachments_vec_t& attachment_requests
...
@@ -132,6 +132,9 @@ void LLAttachmentsMgr::requestAttachments(attachments_vec_t& attachment_requests
return
;
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
;
const
S32
max_objects_per_request
=
5
;
S32
obj_count
=
llmin
((
S32
)
attachment_requests
.
size
(),
max_objects_per_request
);
S32
obj_count
=
llmin
((
S32
)
attachment_requests
.
size
(),
max_objects_per_request
);
if
(
obj_count
==
0
)
if
(
obj_count
==
0
)
...
@@ -147,7 +150,6 @@ void LLAttachmentsMgr::requestAttachments(attachments_vec_t& attachment_requests
...
@@ -147,7 +150,6 @@ void LLAttachmentsMgr::requestAttachments(attachments_vec_t& attachment_requests
{
{
LL_WARNS
()
<<
"ATT Too many attachments requested: "
<<
obj_count
LL_WARNS
()
<<
"ATT Too many attachments requested: "
<<
obj_count
<<
" exceeds limit of "
<<
MAX_OBJECTS_TO_SEND
<<
LL_ENDL
;
<<
" 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
;
obj_count
=
MAX_OBJECTS_TO_SEND
;
}
}
...
@@ -159,8 +161,10 @@ void LLAttachmentsMgr::requestAttachments(attachments_vec_t& attachment_requests
...
@@ -159,8 +161,10 @@ void LLAttachmentsMgr::requestAttachments(attachments_vec_t& attachment_requests
compound_msg_id
.
generate
();
compound_msg_id
.
generate
();
LLMessageSystem
*
msg
=
gMessageSystem
;
LLMessageSystem
*
msg
=
gMessageSystem
;
// by construction, obj_count <= attachment_requests.size(), so no
// by construction above, obj_count <= attachment_requests.size(), so no
// check against empty() is needed here.
// check against attachment_requests.empty() is needed.
llassert
(
obj_count
<=
attachment_requests
.
size
());
for
(
S32
i
=
0
;
i
<
obj_count
;
i
++
)
for
(
S32
i
=
0
;
i
<
obj_count
;
i
++
)
{
{
if
(
0
==
(
i
%
OBJECTS_PER_PACKET
)
)
if
(
0
==
(
i
%
OBJECTS_PER_PACKET
)
)
...
@@ -196,7 +200,7 @@ void LLAttachmentsMgr::requestAttachments(attachments_vec_t& attachment_requests
...
@@ -196,7 +200,7 @@ void LLAttachmentsMgr::requestAttachments(attachments_vec_t& attachment_requests
}
}
else
else
{
{
LL_
INFO
S
(
"Avatar"
)
<<
"ATT Attempted to add non-existent item ID:"
<<
attachment
.
mItemID
<<
LL_ENDL
;
LL_
WARN
S
(
"Avatar"
)
<<
"ATT Attempted to add non-existent item ID:"
<<
attachment
.
mItemID
<<
LL_ENDL
;
}
}
if
(
(
i
+
1
==
obj_count
)
||
((
OBJECTS_PER_PACKET
-
1
)
==
(
i
%
OBJECTS_PER_PACKET
))
)
if
(
(
i
+
1
==
obj_count
)
||
((
OBJECTS_PER_PACKET
-
1
)
==
(
i
%
OBJECTS_PER_PACKET
))
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment