summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-04-15 16:22:15 -0700
committerJames Cook <james@lindenlab.com>2010-04-15 16:22:15 -0700
commit4218819951a5caa1499e79d8bd4f1bf08fe3b3cc (patch)
treecb9a4b19346e9e04d89098681ea67e20633c7353 /indra/newview
parentfedfbbb8d8696044cace410365e348b20a1e2420 (diff)
DEV-47529 Viewer looks up display names via a sim cap
Squire asked me to route display name lookups via a simulator capability using HTTP GET. This buys us authentication until the data services team can implement a public-facing authenticating web service for People API.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llstartup.cpp3
-rw-r--r--indra/newview/llviewerregion.cpp16
2 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 8f5ad63cc3..18792950eb 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -2772,8 +2772,7 @@ void LLStartUp::initNameCache()
// Load stored cache if possible
LLAppViewer::instance()->loadNameCache();
- // JAMESDEBUG TODO: won't need service url here, will use capability
- LLAvatarNameCache::initClass("http://pdp60.lindenlab.com:8000/");
+ LLAvatarNameCache::initClass();
}
void LLStartUp::cleanupNameCache()
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 8f43b6bcf7..2b907ee24a 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -34,7 +34,9 @@
#include "llviewerregion.h"
+// linden libraries
#include "indra_constants.h"
+#include "llavatarnamecache.h" // name lookup cap url
#include "llfloaterreg.h"
#include "llmath.h"
#include "llhttpclient.h"
@@ -173,6 +175,19 @@ public:
mRegion->showReleaseNotes();
}
}
+
+ // 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);
if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState())
{
@@ -1474,6 +1489,7 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
capabilityNames.append("ObjectMediaNavigate");
capabilityNames.append("FetchLib");
capabilityNames.append("FetchLibDescendents");
+ capabilityNames.append("GetDisplayNames");
capabilityNames.append("GetTexture");
capabilityNames.append("GroupProposalBallot");
capabilityNames.append("HomeLocation");