Skip to content
Snippets Groups Projects
Commit 984353d7 authored by Cinder's avatar Cinder
Browse files

STORM-2036 - Fix trying to parse caps too early by adding a callback to check...

STORM-2036 - Fix trying to parse caps too early by adding a callback to check region caps when they haven't already been received
parent d949bee0
No related branches found
No related tags found
No related merge requests found
...@@ -321,6 +321,7 @@ Cinder Roxley ...@@ -321,6 +321,7 @@ Cinder Roxley
STORM-1958 STORM-1958
STORM-1952 STORM-1952
STORM-1951 STORM-1951
STORM-2036
Clara Young Clara Young
Coaldust Numbers Coaldust Numbers
VWR-1095 VWR-1095
......
...@@ -128,7 +128,6 @@ void LLSyntaxIdLSL::buildFullFileSpec() ...@@ -128,7 +128,6 @@ void LLSyntaxIdLSL::buildFullFileSpec()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
bool LLSyntaxIdLSL::syntaxIdChanged() bool LLSyntaxIdLSL::syntaxIdChanged()
{ {
bool version_changed = false;
LLViewerRegion* region = gAgent.getRegion(); LLViewerRegion* region = gAgent.getRegion();
if (region) if (region)
...@@ -148,7 +147,7 @@ bool LLSyntaxIdLSL::syntaxIdChanged() ...@@ -148,7 +147,7 @@ bool LLSyntaxIdLSL::syntaxIdChanged()
{ {
LL_DEBUGS("SyntaxLSL") << "New SyntaxID '" << new_syntax_id << "' found." << LL_ENDL; LL_DEBUGS("SyntaxLSL") << "New SyntaxID '" << new_syntax_id << "' found." << LL_ENDL;
mSyntaxId = new_syntax_id; mSyntaxId = new_syntax_id;
version_changed = true; return true;
} }
else else
LL_DEBUGS("SyntaxLSL") << "SyntaxID matches what we have." << LL_ENDL; LL_DEBUGS("SyntaxLSL") << "SyntaxID matches what we have." << LL_ENDL;
...@@ -156,10 +155,11 @@ bool LLSyntaxIdLSL::syntaxIdChanged() ...@@ -156,10 +155,11 @@ bool LLSyntaxIdLSL::syntaxIdChanged()
} }
else else
{ {
LL_WARNS("SyntaxLSL") << "Region '" << region->getName() << "' has not received capabilities. Cannot process SyntaxId." << LL_ENDL; region->setCapabilitiesReceivedCallback(boost::bind(&LLSyntaxIdLSL::handleCapsReceived, this, _1));
LL_DEBUGS("SyntaxLSL") << "Region has not received capabilities. Waiting for caps..." << LL_ENDL;
} }
} }
return version_changed; return false;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -307,6 +307,17 @@ void LLSyntaxIdLSL::handleRegionChanged() ...@@ -307,6 +307,17 @@ void LLSyntaxIdLSL::handleRegionChanged()
} }
} }
void LLSyntaxIdLSL::handleCapsReceived(const LLUUID& region_uuid)
{
LLViewerRegion* current_region = gAgent.getRegion();
if (region_uuid.notNull()
&& current_region->getRegionID() == region_uuid)
{
syntaxIdChanged();
}
}
void LLSyntaxIdLSL::handleFileFetched(const std::string& filepath) void LLSyntaxIdLSL::handleFileFetched(const std::string& filepath)
{ {
mInflightFetches.remove(filepath); mInflightFetches.remove(filepath);
......
...@@ -48,6 +48,7 @@ class LLSyntaxIdLSL : public LLSingleton<LLSyntaxIdLSL> ...@@ -48,6 +48,7 @@ class LLSyntaxIdLSL : public LLSingleton<LLSyntaxIdLSL>
bool syntaxIdChanged(); bool syntaxIdChanged();
bool isSupportedVersion(const LLSD& content); bool isSupportedVersion(const LLSD& content);
void handleRegionChanged(); void handleRegionChanged();
void handleCapsReceived(const LLUUID& region_uuid);
void handleFileFetched(const std::string& filepath); void handleFileFetched(const std::string& filepath);
void setKeywordsXml(const LLSD& content) { mKeywordsXml = content; }; void setKeywordsXml(const LLSD& content) { mKeywordsXml = content; };
void buildFullFileSpec(); void buildFullFileSpec();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment