aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorroot2010-09-17 01:50:48 +0200
committerroot2010-09-17 01:50:48 +0200
commit251f2444d049ed525ef41c4c4792ec446c53b973 (patch)
tree6d32c9b3716d181672fe162a882f09590f31ac0d /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentRemoving debug (diff)
downloadopensim-SC-251f2444d049ed525ef41c4c4792ec446c53b973.zip
opensim-SC-251f2444d049ed525ef41c4c4792ec446c53b973.tar.gz
opensim-SC-251f2444d049ed525ef41c4c4792ec446c53b973.tar.bz2
opensim-SC-251f2444d049ed525ef41c4c4792ec446c53b973.tar.xz
Revert "* Changed 11 calls for session info to the more optimized API method"
This reverts commit 5dc9ea2f2487804d788b4b80d40d91bd792de4c2. Also makes online indicators and IM more robust
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs26
1 files changed, 24 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e299f96..0dd1787 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4296,7 +4296,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4296 } 4296 }
4297 4297
4298 4298
4299 pinfo = World.PresenceService.GetAgent(uuid); 4299 PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() });
4300 if (pinfos != null && pinfos.Length > 0)
4301 {
4302 foreach (PresenceInfo p in pinfos)
4303 {
4304 if (p.RegionID != UUID.Zero)
4305 {
4306 pinfo = p;
4307 }
4308 }
4309 }
4300 4310
4301 ce = new UserInfoCacheEntry(); 4311 ce = new UserInfoCacheEntry();
4302 ce.time = Util.EnvironmentTickCount(); 4312 ce.time = Util.EnvironmentTickCount();
@@ -4315,7 +4325,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4315 4325
4316 if (Util.EnvironmentTickCount() < ce.time || (Util.EnvironmentTickCount() - ce.time) >= 20000) 4326 if (Util.EnvironmentTickCount() < ce.time || (Util.EnvironmentTickCount() - ce.time) >= 20000)
4317 { 4327 {
4318 pinfo = World.PresenceService.GetAgent(uuid); 4328 PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() });
4329 if (pinfos != null && pinfos.Length > 0)
4330 {
4331 foreach (PresenceInfo p in pinfos)
4332 {
4333 if (p.RegionID != UUID.Zero)
4334 {
4335 pinfo = p;
4336 }
4337 }
4338 }
4339 else
4340 pinfo = null;
4319 4341
4320 ce.time = Util.EnvironmentTickCount(); 4342 ce.time = Util.EnvironmentTickCount();
4321 ce.pinfo = pinfo; 4343 ce.pinfo = pinfo;