aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/AssetService/AssetService.cs17
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs12
-rw-r--r--OpenSim/Services/GridService/GridService.cs3
-rw-r--r--OpenSim/Services/HypergridService/UserAgentService.cs4
-rw-r--r--OpenSim/Services/Interfaces/IPresenceService.cs28
-rw-r--r--OpenSim/Services/PresenceService/PresenceService.cs6
6 files changed, 23 insertions, 47 deletions
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs
index 4e512e7..470a4dd 100644
--- a/OpenSim/Services/AssetService/AssetService.cs
+++ b/OpenSim/Services/AssetService/AssetService.cs
@@ -156,6 +156,22 @@ namespace OpenSim.Services.AssetService
156 156
157 public bool Delete(string id) 157 public bool Delete(string id)
158 { 158 {
159 m_log.DebugFormat("[ASSET SERVICE]: Deleting asset {0}", id);
160 UUID assetID;
161 if (!UUID.TryParse(id, out assetID))
162 return false;
163
164 AssetBase asset = m_Database.GetAsset(assetID);
165 if (asset == null)
166 return false;
167
168 if ((int)(asset.Flags & AssetFlags.Maptile) != 0)
169 {
170 return m_Database.Delete(id);
171 }
172 else
173 m_log.DebugFormat("[ASSET SERVICE]: Request to delete asset {0}, but flags are not Maptile", id);
174
159 return false; 175 return false;
160 } 176 }
161 177
@@ -181,6 +197,7 @@ namespace OpenSim.Services.AssetService
181 MainConsole.Instance.Output(String.Format("Description: {0}", asset.Description)); 197 MainConsole.Instance.Output(String.Format("Description: {0}", asset.Description));
182 MainConsole.Instance.Output(String.Format("Type: {0}", asset.Type)); 198 MainConsole.Instance.Output(String.Format("Type: {0}", asset.Type));
183 MainConsole.Instance.Output(String.Format("Content-type: {0}", asset.Metadata.ContentType)); 199 MainConsole.Instance.Output(String.Format("Content-type: {0}", asset.Metadata.ContentType));
200 MainConsole.Instance.Output(String.Format("Flags: {0}", asset.Metadata.Flags.ToString()));
184 201
185 for (i = 0 ; i < 5 ; i++) 202 for (i = 0 ; i < 5 ; i++)
186 { 203 {
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
index e48b7de..b86c45c 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
@@ -511,20 +511,8 @@ namespace OpenSim.Services.Connectors.SimianGrid
511 511
512 PresenceInfo info = new PresenceInfo(); 512 PresenceInfo info = new PresenceInfo();
513 513
514 info.Online = true;
515 info.UserID = sessionResponse["UserID"].AsUUID().ToString(); 514 info.UserID = sessionResponse["UserID"].AsUUID().ToString();
516 info.RegionID = sessionResponse["SceneID"].AsUUID(); 515 info.RegionID = sessionResponse["SceneID"].AsUUID();
517 info.Position = sessionResponse["ScenePosition"].AsVector3();
518 info.LookAt = sessionResponse["SceneLookAt"].AsVector3();
519
520 if (userResponse != null && userResponse["User"] is OSDMap)
521 {
522 OSDMap user = (OSDMap)userResponse["User"];
523
524 info.Login = user["LastLoginDate"].AsDate();
525 info.Logout = user["LastLogoutDate"].AsDate();
526 DeserializeLocation(user["HomeLocation"].AsString(), out info.HomeRegionID, out info.HomePosition, out info.HomeLookAt);
527 }
528 516
529 return info; 517 return info;
530 } 518 }
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 4089fce..7c98642 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -324,6 +324,7 @@ namespace OpenSim.Services.GridService
324 324
325 if (rdatas != null) 325 if (rdatas != null)
326 { 326 {
327 m_log.DebugFormat("[GRID SERVICE]: Found {0} regions", rdatas.Count);
327 foreach (RegionData rdata in rdatas) 328 foreach (RegionData rdata in rdatas)
328 { 329 {
329 if (count++ < maxNumber) 330 if (count++ < maxNumber)
@@ -331,7 +332,7 @@ namespace OpenSim.Services.GridService
331 } 332 }
332 } 333 }
333 334
334 if (m_AllowHypergridMapSearch && (rdatas == null || (rdatas != null && rdatas.Count == 0) && name.Contains("."))) 335 if (m_AllowHypergridMapSearch && (rdatas == null || (rdatas != null && rdatas.Count == 0)) && name.Contains("."))
335 { 336 {
336 GridRegion r = m_HypergridLinker.LinkRegion(scopeID, name); 337 GridRegion r = m_HypergridLinker.LinkRegion(scopeID, name);
337 if (r != null) 338 if (r != null)
diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs
index 3af7ef9..64f7e8a 100644
--- a/OpenSim/Services/HypergridService/UserAgentService.cs
+++ b/OpenSim/Services/HypergridService/UserAgentService.cs
@@ -185,6 +185,10 @@ namespace OpenSim.Services.HypergridService
185 foreach (UUID session in travels) 185 foreach (UUID session in travels)
186 m_TravelingAgents.Remove(session); 186 m_TravelingAgents.Remove(session);
187 } 187 }
188
189 GridUserInfo guinfo = m_GridUserService.GetGridUserInfo(userID.ToString());
190 if (guinfo != null)
191 m_GridUserService.LoggedOut(userID.ToString(), guinfo.LastRegionID, guinfo.LastPosition, guinfo.LastLookAt);
188 } 192 }
189 193
190 // We need to prevent foreign users with the same UUID as a local user 194 // We need to prevent foreign users with the same UUID as a local user
diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs
index abbae2c..8d583ff 100644
--- a/OpenSim/Services/Interfaces/IPresenceService.cs
+++ b/OpenSim/Services/Interfaces/IPresenceService.cs
@@ -36,14 +36,6 @@ namespace OpenSim.Services.Interfaces
36 { 36 {
37 public string UserID; 37 public string UserID;
38 public UUID RegionID; 38 public UUID RegionID;
39 public bool Online;
40 public DateTime Login;
41 public DateTime Logout;
42 public Vector3 Position;
43 public Vector3 LookAt;
44 public UUID HomeRegionID;
45 public Vector3 HomePosition;
46 public Vector3 HomeLookAt;
47 39
48 public PresenceInfo() 40 public PresenceInfo()
49 { 41 {
@@ -65,26 +57,6 @@ namespace OpenSim.Services.Interfaces
65 57
66 return result; 58 return result;
67 } 59 }
68
69 public static PresenceInfo[] GetOnlinePresences(PresenceInfo[] pinfos)
70 {
71 if (pinfos == null)
72 return null;
73
74 List<PresenceInfo> lst = new List<PresenceInfo>(pinfos);
75 lst = lst.FindAll(delegate(PresenceInfo each) { return each.Online; });
76
77 return lst.ToArray();
78 }
79
80 public static PresenceInfo GetOnlinePresence(PresenceInfo[] pinfos)
81 {
82 pinfos = GetOnlinePresences(pinfos);
83 if (pinfos != null && pinfos.Length >= 1)
84 return pinfos[0];
85
86 return null;
87 }
88 } 60 }
89 61
90 public interface IPresenceService 62 public interface IPresenceService
diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs
index 7e7e98e..19f636a 100644
--- a/OpenSim/Services/PresenceService/PresenceService.cs
+++ b/OpenSim/Services/PresenceService/PresenceService.cs
@@ -115,10 +115,6 @@ namespace OpenSim.Services.PresenceService
115 115
116 ret.UserID = data.UserID; 116 ret.UserID = data.UserID;
117 ret.RegionID = data.RegionID; 117 ret.RegionID = data.RegionID;
118 if (data.Data.ContainsKey("Position"))
119 ret.Position = Vector3.Parse(data.Data["Position"]);
120 if (data.Data.ContainsKey("LookAt"))
121 ret.LookAt = Vector3.Parse(data.Data["LookAt"]);
122 118
123 return ret; 119 return ret;
124 } 120 }
@@ -138,8 +134,6 @@ namespace OpenSim.Services.PresenceService
138 134
139 ret.UserID = d.UserID; 135 ret.UserID = d.UserID;
140 ret.RegionID = d.RegionID; 136 ret.RegionID = d.RegionID;
141 ret.Position = Vector3.Parse(d.Data["Position"]);
142 ret.LookAt = Vector3.Parse(d.Data["LookAt"]);
143 137
144 info.Add(ret); 138 info.Add(ret);
145 } 139 }