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
d38727e4
Commit
d38727e4
authored
15 years ago
by
James Cook
Browse files
Options
Downloads
Patches
Plain Diff
DEV-47529 Viewer refresh name lookup cap URL on region cross/teleport
Reviewed with Kelly
parent
fec93382
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
indra/newview/llappviewer.cpp
+37
-5
37 additions, 5 deletions
indra/newview/llappviewer.cpp
indra/newview/llappviewer.h
+2
-0
2 additions, 0 deletions
indra/newview/llappviewer.h
indra/newview/llviewerregion.cpp
+0
-18
0 additions, 18 deletions
indra/newview/llviewerregion.cpp
with
39 additions
and
23 deletions
indra/newview/llappviewer.cpp
+
37
−
5
View file @
d38727e4
...
@@ -3541,9 +3541,10 @@ void LLAppViewer::idle()
...
@@ -3541,9 +3541,10 @@ void LLAppViewer::idle()
// NOTE: Starting at this point, we may still have pointers to "dead" objects
// NOTE: Starting at this point, we may still have pointers to "dead" objects
// floating throughout the various object lists.
// floating throughout the various object lists.
//
//
idleNameCache
();
idleNetwork
();
idleNetwork
();
// Check for away from keyboard, kick idle agents.
// Check for away from keyboard, kick idle agents.
idle_afk_check
();
idle_afk_check
();
...
@@ -3878,6 +3879,41 @@ void LLAppViewer::sendLogoutRequest()
...
@@ -3878,6 +3879,41 @@ void LLAppViewer::sendLogoutRequest()
}
}
}
}
void
LLAppViewer
::
idleNameCache
()
{
// Neither old nor new name cache can function before agent has a region
LLViewerRegion
*
region
=
gAgent
.
getRegion
();
if
(
!
region
)
return
;
// deal with any queued name requests and replies.
gCacheName
->
processPending
();
// Agent may have moved to a different region, so need to update cap URL
// for name lookups. Can't do this in the cap grant code, as caps are
// granted to neighbor regions before the main agent gets there. Can't
// do it in the move-into-region code because cap not guaranteed to be
// granted yet, for example on teleport.
std
::
string
name_lookup_url
;
name_lookup_url
.
reserve
(
128
);
// avoid a memory allocation below
name_lookup_url
=
region
->
getCapability
(
"GetDisplayNames"
);
// Ensure capability has been granted
U32
url_size
=
name_lookup_url
.
size
();
if
(
url_size
>
0
)
{
// capabilities require URLs with slashes before query params:
// https://<host>:<port>/cap/<uuid>/?ids=<blah>
// but the caps are granted like:
// https://<host>:<port>/cap/<uuid>
if
(
name_lookup_url
[
url_size
-
1
]
!=
'/'
)
{
name_lookup_url
+=
'/'
;
}
LLAvatarNameCache
::
setNameLookupURL
(
name_lookup_url
);
}
LLAvatarNameCache
::
idle
();
}
//
//
// Handle messages, and all message related stuff
// Handle messages, and all message related stuff
//
//
...
@@ -3905,10 +3941,6 @@ void LLAppViewer::idleNetwork()
...
@@ -3905,10 +3941,6 @@ void LLAppViewer::idleNetwork()
{
{
LLFastTimer
t
(
FTM_IDLE_NETWORK
);
// decode
LLFastTimer
t
(
FTM_IDLE_NETWORK
);
// decode
// deal with any queued name requests and replies.
gCacheName
->
processPending
();
LLAvatarNameCache
::
idle
();
llpushcallstacks
;
llpushcallstacks
;
LLTimer
check_message_timer
;
LLTimer
check_message_timer
;
// Read all available packets from network
// Read all available packets from network
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llappviewer.h
+
2
−
0
View file @
d38727e4
...
@@ -210,6 +210,8 @@ class LLAppViewer : public LLApp
...
@@ -210,6 +210,8 @@ class LLAppViewer : public LLApp
void
idle
();
void
idle
();
void
idleShutdown
();
void
idleShutdown
();
// update avatar SLID and display name caches
void
idleNameCache
();
void
idleNetwork
();
void
idleNetwork
();
void
sendLogoutRequest
();
void
sendLogoutRequest
();
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llviewerregion.cpp
+
0
−
18
View file @
d38727e4
...
@@ -175,24 +175,6 @@ class BaseCapabilitiesComplete : public LLHTTPClient::Responder
...
@@ -175,24 +175,6 @@ class BaseCapabilitiesComplete : public LLHTTPClient::Responder
mRegion
->
showReleaseNotes
();
mRegion
->
showReleaseNotes
();
}
}
}
}
// JAMESDEBUG *TODO* THIS IS WRONG!!!!!!!!!!!!!!!!!!!!!
// this isn't necessarily the region the viewer is in
// Avatar name lookup library needs to know who to ask
std
::
string
name_lookup_url
=
mRegion
->
getCapability
(
"GetDisplayNames"
);
// capabilities require URLs with slashes before query params, like:
// https://<host>:<port>/cap/<uuid>/?ids=<blah>
// but the caps are granted like:
// https://<host>:<port>/cap/<uuid>
U32
url_size
=
name_lookup_url
.
size
();
if
(
url_size
>
0
&&
name_lookup_url
[
url_size
-
1
]
!=
'/'
)
{
name_lookup_url
+=
'/'
;
}
LLAvatarNameCache
::
setNameLookupURL
(
name_lookup_url
);
llinfos
<<
"JAMESDEBUG cap "
<<
name_lookup_url
<<
llendl
;
if
(
STATE_SEED_GRANTED_WAIT
==
LLStartUp
::
getStartupState
())
if
(
STATE_SEED_GRANTED_WAIT
==
LLStartUp
::
getStartupState
())
{
{
...
...
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