diff options
author | Logan Dethrow <log@lindenlab.com> | 2013-04-01 20:10:39 -0400 |
---|---|---|
committer | Logan Dethrow <log@lindenlab.com> | 2013-04-01 20:10:39 -0400 |
commit | 9927963ac9d7ef19db96e8d5ffa04c04d0e3b803 (patch) | |
tree | db2427d20db6286cb87b92e2ac9ca6989e798039 /indra/newview/llviewerregion.cpp | |
parent | 298660a5f15e08ef00c240330553f3228db5437f (diff) |
If we get more caps from a subsequent grant for a region, go ahead and use them. This is a hack that should be safe to remove after SH-3895 is fixed everywhere on the sim side.
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r-- | indra/newview/llviewerregion.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 223f754c2e..f4b6ff318b 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -347,12 +347,23 @@ private: // ++iter; //} - regionp->getRegionImplNC()->mSecondCapabilitiesTracker.clear(); + if (regionp->getRegionImpl()->mSecondCapabilitiesTracker.size() > regionp->getRegionImpl()->mCapabilities.size() ) + { + // *HACK Since we were granted more base capabilities in this grant request than the initial, replace + // the old with the new. This shouldn't happen i.e. we should always get the same capabilities from a + // sim. The simulator fix from SH-3895 should prevent it from happening, at least in the case of the + // inventory api capability grants. + + // Need to clear a std::map before copying into it because old keys take precedence. + regionp->getRegionImplNC()->mCapabilities.clear(); + regionp->getRegionImplNC()->mCapabilities = regionp->getRegionImpl()->mSecondCapabilitiesTracker; + } } else { LL_DEBUGS("CrossingCaps") << "Sim sent multiple base cap grants with matching sizes." << LL_ENDL; } + regionp->getRegionImplNC()->mSecondCapabilitiesTracker.clear(); } |