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
da982a22
Commit
da982a22
authored
4 years ago
by
Brad Payne (Vir Linden)
Browse files
Options
Downloads
Patches
Plain Diff
SL-14570 - added getFullPath(), cleaned up logging at bit
parent
38ce446a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llinventorymodel.cpp
+36
-30
36 additions, 30 deletions
indra/newview/llinventorymodel.cpp
indra/newview/llinventorymodel.h
+1
-0
1 addition, 0 deletions
indra/newview/llinventorymodel.h
with
37 additions
and
30 deletions
indra/newview/llinventorymodel.cpp
+
36
−
30
View file @
da982a22
...
...
@@ -2286,11 +2286,11 @@ bool LLInventoryModel::loadSkeleton(
}
}
LL_
INFO
S
(
LOG_INV
)
<<
"Attempted to add "
<<
bad_link_count
<<
" cached link items without baseobj present. "
<<
good_link_count
<<
" link items were successfully added. "
<<
recovered_link_count
<<
" links added in recovery. "
<<
"The corresponding categories were invalidated."
<<
LL_ENDL
;
LL_
DEBUG
S
(
LOG_INV
)
<<
"Attempted to add "
<<
bad_link_count
<<
" cached link items without baseobj present. "
<<
good_link_count
<<
" link items were successfully added. "
<<
recovered_link_count
<<
" links added in recovery. "
<<
"The corresponding categories were invalidated."
<<
LL_ENDL
;
}
}
...
...
@@ -2316,7 +2316,10 @@ bool LLInventoryModel::loadSkeleton(
cat
->
setVersion
(
NO_VERSION
);
LL_DEBUGS
(
LOG_INV
)
<<
"Invalidating category name: "
<<
cat
->
getName
()
<<
" UUID: "
<<
cat
->
getUUID
()
<<
" due to invalid descendents cache"
<<
LL_ENDL
;
}
LL_INFOS
(
LOG_INV
)
<<
"Invalidated "
<<
invalid_categories
.
size
()
<<
" categories due to invalid descendents cache"
<<
LL_ENDL
;
if
(
invalid_categories
.
size
()
>
0
)
{
LL_DEBUGS
(
LOG_INV
)
<<
"Invalidated "
<<
invalid_categories
.
size
()
<<
" categories due to invalid descendents cache"
<<
LL_ENDL
;
}
// At this point, we need to set the known descendents for each
// category which successfully cached so that we do not
...
...
@@ -3735,24 +3738,6 @@ void LLInventoryModel::dumpInventory() const
LL_INFOS
()
<<
"
\n
**********************
\n
End Inventory Dump"
<<
LL_ENDL
;
}
std
::
string
get_full_path
(
const
LLInventoryObject
*
cat
)
{
std
::
vector
<
std
::
string
>
path_elts
;
std
::
map
<
LLUUID
,
bool
>
visited
;
while
(
cat
!=
NULL
&&
!
visited
[
cat
->
getUUID
()])
{
path_elts
.
push_back
(
cat
->
getName
());
// avoid infinite loop in the unlikely event of a cycle
visited
[
cat
->
getUUID
()]
=
true
;
cat
=
gInventory
.
getObject
(
cat
->
getParentUUID
());
}
std
::
stringstream
s
;
std
::
string
delim
(
"/"
);
std
::
reverse
(
path_elts
.
begin
(),
path_elts
.
end
());
std
::
string
result
=
"/"
+
boost
::
algorithm
::
join
(
path_elts
,
delim
);
return
result
;
}
// Do various integrity checks on model, logging issues found and
// returning an overall good/bad flag.
LLPointer
<
LLInventoryValidationInfo
>
LLInventoryModel
::
validate
()
const
...
...
@@ -3841,11 +3826,13 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
{
version_unknown_count
++
;
}
if
(
mCategoryLock
.
count
(
cat_id
))
auto
cat_lock_it
=
mCategoryLock
.
find
(
cat_id
);
if
(
cat_lock_it
!=
mCategoryLock
.
end
()
&&
cat_lock_it
->
second
)
{
cat_lock
++
;
}
if
(
mItemLock
.
count
(
cat_id
))
auto
item_lock_it
=
mItemLock
.
find
(
cat_id
);
if
(
item_lock_it
!=
mItemLock
.
end
()
&&
item_lock_it
->
second
)
{
item_lock
++
;
}
...
...
@@ -3959,7 +3946,7 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
ft_counts_under_root
[
folder_type
]
++
;
if
(
folder_type
!=
LLFolderType
::
FT_NONE
)
{
LL_DEBUGS
(
"Inventory"
)
<<
"Under root cat: "
<<
get
_f
ull
_p
ath
(
cat
)
<<
" folder_type "
<<
folder_type
<<
LL_ENDL
;
LL_DEBUGS
(
"Inventory"
)
<<
"Under root cat: "
<<
get
F
ull
P
ath
(
cat
)
<<
" folder_type "
<<
folder_type
<<
LL_ENDL
;
}
}
else
...
...
@@ -3967,7 +3954,7 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
ft_counts_elsewhere
[
folder_type
]
++
;
if
(
folder_type
!=
LLFolderType
::
FT_NONE
)
{
LL_DEBUGS
(
"Inventory"
)
<<
"Elsewhere cat: "
<<
get
_f
ull
_p
ath
(
cat
)
<<
" folder_type "
<<
folder_type
<<
LL_ENDL
;
LL_DEBUGS
(
"Inventory"
)
<<
"Elsewhere cat: "
<<
get
F
ull
P
ath
(
cat
)
<<
" folder_type "
<<
folder_type
<<
LL_ENDL
;
}
}
}
...
...
@@ -4129,11 +4116,11 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
}
if
(
desc_unknown_count
!=
0
)
{
LL_
INFO
S
()
<<
"Found "
<<
desc_unknown_count
<<
" cats with unknown descendent count"
<<
LL_ENDL
;
LL_
DEBUG
S
()
<<
"Found "
<<
desc_unknown_count
<<
" cats with unknown descendent count"
<<
LL_ENDL
;
}
if
(
version_unknown_count
!=
0
)
{
LL_
INFO
S
(
"Inventory"
)
<<
"Found "
<<
version_unknown_count
<<
" cats with unknown version"
<<
LL_ENDL
;
LL_
DEBUG
S
(
"Inventory"
)
<<
"Found "
<<
version_unknown_count
<<
" cats with unknown version"
<<
LL_ENDL
;
}
// FIXME need to fail login and tell user to retry, contact support if problem persists.
...
...
@@ -4146,6 +4133,25 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
return
validation_info
;
}
// Provides a unix-style path from root, like "/My Inventory/Clothing/.../myshirt"
std
::
string
LLInventoryModel
::
getFullPath
(
const
LLInventoryObject
*
obj
)
const
{
std
::
vector
<
std
::
string
>
path_elts
;
std
::
map
<
LLUUID
,
bool
>
visited
;
while
(
obj
!=
NULL
&&
!
visited
[
obj
->
getUUID
()])
{
path_elts
.
push_back
(
obj
->
getName
());
// avoid infinite loop in the unlikely event of a cycle
visited
[
obj
->
getUUID
()]
=
true
;
obj
=
getObject
(
obj
->
getParentUUID
());
}
std
::
stringstream
s
;
std
::
string
delim
(
"/"
);
std
::
reverse
(
path_elts
.
begin
(),
path_elts
.
end
());
std
::
string
result
=
"/"
+
boost
::
algorithm
::
join
(
path_elts
,
delim
);
return
result
;
}
///----------------------------------------------------------------------------
/// Local function definitions
///----------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llinventorymodel.h
+
1
−
0
View file @
da982a22
...
...
@@ -671,6 +671,7 @@ class LLInventoryModel
public
:
void
dumpInventory
()
const
;
LLPointer
<
LLInventoryValidationInfo
>
validate
()
const
;
std
::
string
getFullPath
(
const
LLInventoryObject
*
obj
)
const
;
/** Miscellaneous
** **
...
...
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