diff options
Diffstat (limited to 'indra/newview/llsyntaxid.cpp')
-rw-r--r-- | indra/newview/llsyntaxid.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 9b82710161..b1194dcd1b 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -128,7 +128,6 @@ void LLSyntaxIdLSL::buildFullFileSpec() //----------------------------------------------------------------------------- bool LLSyntaxIdLSL::syntaxIdChanged() { - bool version_changed = false; LLViewerRegion* region = gAgent.getRegion(); if (region) @@ -148,7 +147,7 @@ bool LLSyntaxIdLSL::syntaxIdChanged() { LL_DEBUGS("SyntaxLSL") << "New SyntaxID '" << new_syntax_id << "' found." << LL_ENDL; mSyntaxId = new_syntax_id; - version_changed = true; + return true; } else LL_DEBUGS("SyntaxLSL") << "SyntaxID matches what we have." << LL_ENDL; @@ -156,10 +155,11 @@ bool LLSyntaxIdLSL::syntaxIdChanged() } 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() } } +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) { mInflightFetches.remove(filepath); |