diff options
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Services')
8 files changed, 63 insertions, 54 deletions
diff --git a/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs index d7a5731..36b5083 100644 --- a/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs +++ b/OpenSim/Services/Connectors/Friends/FriendsServiceConnector.cs | |||
@@ -156,8 +156,6 @@ namespace OpenSim.Services.Connectors | |||
156 | 156 | ||
157 | sendData["METHOD"] = "storefriend"; | 157 | sendData["METHOD"] = "storefriend"; |
158 | 158 | ||
159 | string reqString = ServerUtils.BuildQueryString(sendData); | ||
160 | |||
161 | string reply = string.Empty; | 159 | string reply = string.Empty; |
162 | try | 160 | try |
163 | { | 161 | { |
@@ -199,8 +197,6 @@ namespace OpenSim.Services.Connectors | |||
199 | sendData["FRIEND"] = Friend; | 197 | sendData["FRIEND"] = Friend; |
200 | sendData["METHOD"] = "deletefriend"; | 198 | sendData["METHOD"] = "deletefriend"; |
201 | 199 | ||
202 | string reqString = ServerUtils.BuildQueryString(sendData); | ||
203 | |||
204 | string reply = string.Empty; | 200 | string reply = string.Empty; |
205 | try | 201 | try |
206 | { | 202 | { |
@@ -232,10 +228,8 @@ namespace OpenSim.Services.Connectors | |||
232 | m_log.DebugFormat("[FRIENDS CONNECTOR]: DeleteFriend received null reply"); | 228 | m_log.DebugFormat("[FRIENDS CONNECTOR]: DeleteFriend received null reply"); |
233 | 229 | ||
234 | return false; | 230 | return false; |
235 | |||
236 | } | 231 | } |
237 | 232 | ||
238 | #endregion | 233 | #endregion |
239 | |||
240 | } | 234 | } |
241 | } | 235 | } \ No newline at end of file |
diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs index cabee4c..8d0f7be 100644 --- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs | |||
@@ -31,11 +31,9 @@ using System.Collections.Generic; | |||
31 | using System.Drawing; | 31 | using System.Drawing; |
32 | using System.Net; | 32 | using System.Net; |
33 | using System.Reflection; | 33 | using System.Reflection; |
34 | |||
35 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
36 | using OpenSim.Services.Interfaces; | 35 | using OpenSim.Services.Interfaces; |
37 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 36 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
38 | |||
39 | using OpenMetaverse; | 37 | using OpenMetaverse; |
40 | using OpenMetaverse.Imaging; | 38 | using OpenMetaverse.Imaging; |
41 | using OpenMetaverse.StructuredData; | 39 | using OpenMetaverse.StructuredData; |
@@ -50,7 +48,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
50 | { | 48 | { |
51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 49 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
52 | 50 | ||
53 | private static UUID m_HGMapImage = new UUID("00000000-0000-1111-9999-000000000013"); | 51 | // private static UUID m_HGMapImage = new UUID("00000000-0000-1111-9999-000000000013"); |
54 | 52 | ||
55 | private IAssetService m_AssetService; | 53 | private IAssetService m_AssetService; |
56 | 54 | ||
diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index c1e5949..4501937 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs | |||
@@ -32,12 +32,10 @@ using System.IO; | |||
32 | using System.Net; | 32 | using System.Net; |
33 | using System.Reflection; | 33 | using System.Reflection; |
34 | using System.Text; | 34 | using System.Text; |
35 | |||
36 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
37 | using OpenSim.Services.Interfaces; | 36 | using OpenSim.Services.Interfaces; |
38 | using OpenSim.Services.Connectors.Simulation; | 37 | using OpenSim.Services.Connectors.Simulation; |
39 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | 38 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; |
40 | |||
41 | using OpenMetaverse; | 39 | using OpenMetaverse; |
42 | using OpenMetaverse.StructuredData; | 40 | using OpenMetaverse.StructuredData; |
43 | using log4net; | 41 | using log4net; |
@@ -243,7 +241,7 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
243 | { | 241 | { |
244 | response = request.Send(m_ServerURL, 10000); | 242 | response = request.Send(m_ServerURL, 10000); |
245 | } | 243 | } |
246 | catch (Exception e) | 244 | catch (Exception) |
247 | { | 245 | { |
248 | return null; | 246 | return null; |
249 | } | 247 | } |
@@ -308,13 +306,12 @@ namespace OpenSim.Services.Connectors.Hypergrid | |||
308 | } | 306 | } |
309 | 307 | ||
310 | } | 308 | } |
311 | catch (Exception e) | 309 | catch (Exception) |
312 | { | 310 | { |
313 | return null; | 311 | return null; |
314 | } | 312 | } |
315 | 313 | ||
316 | return null; | 314 | return null; |
317 | |||
318 | } | 315 | } |
319 | 316 | ||
320 | public bool AgentIsComingHome(UUID sessionID, string thisGridExternalName) | 317 | public bool AgentIsComingHome(UUID sessionID, string thisGridExternalName) |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs index a47f32c..734bdd2 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -53,7 +53,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
53 | private static readonly ILog m_log = | 53 | private static readonly ILog m_log = |
54 | LogManager.GetLogger( | 54 | LogManager.GetLogger( |
55 | MethodBase.GetCurrentMethod().DeclaringType); | 55 | MethodBase.GetCurrentMethod().DeclaringType); |
56 | private static string ZeroID = UUID.Zero.ToString(); | 56 | // private static string ZeroID = UUID.Zero.ToString(); |
57 | 57 | ||
58 | private string m_serverUrl = String.Empty; | 58 | private string m_serverUrl = String.Empty; |
59 | 59 | ||
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index 2b6d29c..89c1a5a 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -69,7 +69,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
69 | 69 | ||
70 | private string m_serverUrl = String.Empty; | 70 | private string m_serverUrl = String.Empty; |
71 | private string m_userServerUrl = String.Empty; | 71 | private string m_userServerUrl = String.Empty; |
72 | private object m_gestureSyncRoot = new object(); | 72 | // private object m_gestureSyncRoot = new object(); |
73 | 73 | ||
74 | #region ISharedRegionModule | 74 | #region ISharedRegionModule |
75 | 75 | ||
@@ -687,12 +687,12 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
687 | for (int i = 0; i < items.Count; i++) | 687 | for (int i = 0; i < items.Count; i++) |
688 | itemIDs[i] = items[i].AsUUID().ToString(); | 688 | itemIDs[i] = items[i].AsUUID().ToString(); |
689 | 689 | ||
690 | NameValueCollection requestArgs = new NameValueCollection | 690 | // NameValueCollection requestArgs = new NameValueCollection |
691 | { | 691 | // { |
692 | { "RequestMethod", "GetInventoryNodes" }, | 692 | // { "RequestMethod", "GetInventoryNodes" }, |
693 | { "OwnerID", userID.ToString() }, | 693 | // { "OwnerID", userID.ToString() }, |
694 | { "Items", String.Join(",", itemIDs) } | 694 | // { "Items", String.Join(",", itemIDs) } |
695 | }; | 695 | // }; |
696 | 696 | ||
697 | // FIXME: Implement this in SimianGrid | 697 | // FIXME: Implement this in SimianGrid |
698 | return new List<InventoryItemBase>(0); | 698 | return new List<InventoryItemBase>(0); |
@@ -708,12 +708,12 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
708 | /// the user's inventory</returns> | 708 | /// the user's inventory</returns> |
709 | public int GetAssetPermissions(UUID userID, UUID assetID) | 709 | public int GetAssetPermissions(UUID userID, UUID assetID) |
710 | { | 710 | { |
711 | NameValueCollection requestArgs = new NameValueCollection | 711 | // NameValueCollection requestArgs = new NameValueCollection |
712 | { | 712 | // { |
713 | { "RequestMethod", "GetInventoryNodes" }, | 713 | // { "RequestMethod", "GetInventoryNodes" }, |
714 | { "OwnerID", userID.ToString() }, | 714 | // { "OwnerID", userID.ToString() }, |
715 | { "AssetID", assetID.ToString() } | 715 | // { "AssetID", assetID.ToString() } |
716 | }; | 716 | // }; |
717 | 717 | ||
718 | // FIXME: Implement this in SimianGrid | 718 | // FIXME: Implement this in SimianGrid |
719 | return (int)PermissionMask.All; | 719 | return (int)PermissionMask.All; |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index 6f17931..ca23e27 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -349,24 +349,24 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
349 | return null; | 349 | return null; |
350 | } | 350 | } |
351 | 351 | ||
352 | private OSDMap GetSessionData(UUID sessionID) | 352 | // private OSDMap GetSessionData(UUID sessionID) |
353 | { | 353 | // { |
354 | m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for session " + sessionID); | 354 | // m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for session " + sessionID); |
355 | 355 | // | |
356 | NameValueCollection requestArgs = new NameValueCollection | 356 | // NameValueCollection requestArgs = new NameValueCollection |
357 | { | 357 | // { |
358 | { "RequestMethod", "GetSession" }, | 358 | // { "RequestMethod", "GetSession" }, |
359 | { "SessionID", sessionID.ToString() } | 359 | // { "SessionID", sessionID.ToString() } |
360 | }; | 360 | // }; |
361 | 361 | // | |
362 | OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); | 362 | // OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); |
363 | if (response["Success"].AsBoolean()) | 363 | // if (response["Success"].AsBoolean()) |
364 | return response; | 364 | // return response; |
365 | else | 365 | // else |
366 | m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve session data for session " + sessionID); | 366 | // m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve session data for session " + sessionID); |
367 | 367 | // | |
368 | return null; | 368 | // return null; |
369 | } | 369 | // } |
370 | 370 | ||
371 | private List<PresenceInfo> GetSessions(UUID userID) | 371 | private List<PresenceInfo> GetSessions(UUID userID) |
372 | { | 372 | { |
diff --git a/OpenSim/Services/Interfaces/IInventoryService.cs b/OpenSim/Services/Interfaces/IInventoryService.cs index 1b78fb3..d19faed 100644 --- a/OpenSim/Services/Interfaces/IInventoryService.cs +++ b/OpenSim/Services/Interfaces/IInventoryService.cs | |||
@@ -141,8 +141,11 @@ namespace OpenSim.Services.Interfaces | |||
141 | /// <summary> | 141 | /// <summary> |
142 | /// Add a new item to the user's inventory | 142 | /// Add a new item to the user's inventory |
143 | /// </summary> | 143 | /// </summary> |
144 | /// <param name="item"></param> | 144 | /// <param name="item"> |
145 | /// <returns>true if the item was successfully added</returns> | 145 | /// The item to be added. If item.FolderID == UUID.Zero then the item is added to the most suitable system |
146 | /// folder. If there is no suitable folder then the item is added to the user's root inventory folder. | ||
147 | /// </param> | ||
148 | /// <returns>true if the item was successfully added, false if it was not</returns> | ||
146 | bool AddItem(InventoryItemBase item); | 149 | bool AddItem(InventoryItemBase item); |
147 | 150 | ||
148 | /// <summary> | 151 | /// <summary> |
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index f63ab16..84306e7 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs | |||
@@ -157,6 +157,8 @@ namespace OpenSim.Services.InventoryService | |||
157 | 157 | ||
158 | protected virtual XInventoryFolder[] GetSystemFolders(UUID principalID) | 158 | protected virtual XInventoryFolder[] GetSystemFolders(UUID principalID) |
159 | { | 159 | { |
160 | // m_log.DebugFormat("[XINVENTORY SERVICE]: Getting system folders for {0}", principalID); | ||
161 | |||
160 | XInventoryFolder[] allFolders = m_Database.GetFolders( | 162 | XInventoryFolder[] allFolders = m_Database.GetFolders( |
161 | new string[] { "agentID" }, | 163 | new string[] { "agentID" }, |
162 | new string[] { principalID.ToString() }); | 164 | new string[] { principalID.ToString() }); |
@@ -170,6 +172,9 @@ namespace OpenSim.Services.InventoryService | |||
170 | return false; | 172 | return false; |
171 | }); | 173 | }); |
172 | 174 | ||
175 | // m_log.DebugFormat( | ||
176 | // "[XINVENTORY SERVICE]: Found {0} system folders for {1}", sysFolders.Length, principalID); | ||
177 | |||
173 | return sysFolders; | 178 | return sysFolders; |
174 | } | 179 | } |
175 | 180 | ||
@@ -186,7 +191,7 @@ namespace OpenSim.Services.InventoryService | |||
186 | 191 | ||
187 | foreach (XInventoryFolder x in allFolders) | 192 | foreach (XInventoryFolder x in allFolders) |
188 | { | 193 | { |
189 | //m_log.DebugFormat("[XINVENTORY]: Adding folder {0} to skeleton", x.folderName); | 194 | //m_log.DebugFormat("[XINVENTORY SERVICE]: Adding folder {0} to skeleton", x.folderName); |
190 | folders.Add(ConvertToOpenSim(x)); | 195 | folders.Add(ConvertToOpenSim(x)); |
191 | } | 196 | } |
192 | 197 | ||
@@ -214,12 +219,21 @@ namespace OpenSim.Services.InventoryService | |||
214 | 219 | ||
215 | public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) | 220 | public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) |
216 | { | 221 | { |
222 | // m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0} for user {1}", type, principalID); | ||
223 | |||
217 | XInventoryFolder[] folders = m_Database.GetFolders( | 224 | XInventoryFolder[] folders = m_Database.GetFolders( |
218 | new string[] { "agentID", "type"}, | 225 | new string[] { "agentID", "type"}, |
219 | new string[] { principalID.ToString(), ((int)type).ToString() }); | 226 | new string[] { principalID.ToString(), ((int)type).ToString() }); |
220 | 227 | ||
221 | if (folders.Length == 0) | 228 | if (folders.Length == 0) |
229 | { | ||
230 | // m_log.WarnFormat("[XINVENTORY SERVICE]: Found no folder for type {0} for user {1}", type, principalID); | ||
222 | return null; | 231 | return null; |
232 | } | ||
233 | |||
234 | // m_log.DebugFormat( | ||
235 | // "[XINVENTORY SERVICE]: Found folder {0} {1} for type {2} for user {3}", | ||
236 | // folders[0].folderName, folders[0].folderID, type, principalID); | ||
223 | 237 | ||
224 | return ConvertToOpenSim(folders[0]); | 238 | return ConvertToOpenSim(folders[0]); |
225 | } | 239 | } |
@@ -230,7 +244,7 @@ namespace OpenSim.Services.InventoryService | |||
230 | // connector. So we disregard the principal and look | 244 | // connector. So we disregard the principal and look |
231 | // by ID. | 245 | // by ID. |
232 | // | 246 | // |
233 | m_log.DebugFormat("[XINVENTORY]: Fetch contents for folder {0}", folderID.ToString()); | 247 | m_log.DebugFormat("[XINVENTORY SERVICE]: Fetch contents for folder {0}", folderID.ToString()); |
234 | InventoryCollection inventory = new InventoryCollection(); | 248 | InventoryCollection inventory = new InventoryCollection(); |
235 | inventory.UserID = principalID; | 249 | inventory.UserID = principalID; |
236 | inventory.Folders = new List<InventoryFolderBase>(); | 250 | inventory.Folders = new List<InventoryFolderBase>(); |
@@ -349,6 +363,9 @@ namespace OpenSim.Services.InventoryService | |||
349 | 363 | ||
350 | public virtual bool AddItem(InventoryItemBase item) | 364 | public virtual bool AddItem(InventoryItemBase item) |
351 | { | 365 | { |
366 | // m_log.DebugFormat( | ||
367 | // "[XINVENTORY SERVICE]: Adding item {0} to folder {1} for {2}", item.ID, item.Folder, item.Owner); | ||
368 | |||
352 | return m_Database.StoreItem(ConvertFromOpenSim(item)); | 369 | return m_Database.StoreItem(ConvertFromOpenSim(item)); |
353 | } | 370 | } |
354 | 371 | ||