diff options
author | Melanie Thielker | 2010-06-20 06:23:08 +0200 |
---|---|---|
committer | Melanie Thielker | 2010-06-20 06:23:08 +0200 |
commit | 76b59b8df776121708b7ff93312c25c341b19ea6 (patch) | |
tree | a925ee3c2e209fb906e1533d3d307db7a609ba61 /OpenSim/Region | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC_OLD-76b59b8df776121708b7ff93312c25c341b19ea6.zip opensim-SC_OLD-76b59b8df776121708b7ff93312c25c341b19ea6.tar.gz opensim-SC_OLD-76b59b8df776121708b7ff93312c25c341b19ea6.tar.bz2 opensim-SC_OLD-76b59b8df776121708b7ff93312c25c341b19ea6.tar.xz |
Make dataserver() return a 0 when agent id offline, instead of a timeout
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 61c5add..5c6d382 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4232,22 +4232,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4232 | UUID uuid = (UUID)id; | 4232 | UUID uuid = (UUID)id; |
4233 | 4233 | ||
4234 | UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, uuid); | 4234 | UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, uuid); |
4235 | if (account == null) | ||
4236 | return UUID.Zero.ToString(); | ||
4237 | |||
4235 | 4238 | ||
4236 | PresenceInfo pinfo = null; | 4239 | PresenceInfo pinfo = null; |
4237 | PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() }); | 4240 | PresenceInfo[] pinfos = World.PresenceService.GetAgents(new string[] { uuid.ToString() }); |
4238 | if (pinfos != null && pinfos.Length > 0) | 4241 | if (pinfos != null && pinfos.Length > 0) |
4239 | pinfo = pinfos[0]; | 4242 | pinfo = pinfos[0]; |
4240 | 4243 | ||
4241 | if (pinfo == null) | ||
4242 | return UUID.Zero.ToString(); | ||
4243 | |||
4244 | string reply = String.Empty; | 4244 | string reply = String.Empty; |
4245 | 4245 | ||
4246 | switch (data) | 4246 | switch (data) |
4247 | { | 4247 | { |
4248 | case 1: // DATA_ONLINE (0|1) | 4248 | case 1: // DATA_ONLINE (0|1) |
4249 | // TODO: implement fetching of this information | 4249 | if (pinfo != null && pinfo.RegionID != UUID.Zero) |
4250 | if (pinfo != null) | ||
4251 | reply = "1"; | 4250 | reply = "1"; |
4252 | else | 4251 | else |
4253 | reply = "0"; | 4252 | reply = "0"; |