diff options
author | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-05 19:07:37 +0000 |
commit | b16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch) | |
tree | 6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Capabilities/Handlers/FetchInventory | |
parent | Make it possible to disable the bakes module in the way it is described in co... (diff) | |
download | opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2 opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz |
Massive tab and trailing space cleanup
Diffstat (limited to 'OpenSim/Capabilities/Handlers/FetchInventory')
4 files changed, 12 insertions, 12 deletions
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs index e3a9a22..53ed115 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs | |||
@@ -43,7 +43,7 @@ using Caps = OpenSim.Framework.Capabilities.Caps; | |||
43 | 43 | ||
44 | namespace OpenSim.Capabilities.Handlers | 44 | namespace OpenSim.Capabilities.Handlers |
45 | { | 45 | { |
46 | public class FetchInvDescHandler | 46 | public class FetchInvDescHandler |
47 | { | 47 | { |
48 | private static readonly ILog m_log = | 48 | private static readonly ILog m_log = |
49 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 49 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -53,14 +53,14 @@ namespace OpenSim.Capabilities.Handlers | |||
53 | private IScene m_Scene; | 53 | private IScene m_Scene; |
54 | // private object m_fetchLock = new Object(); | 54 | // private object m_fetchLock = new Object(); |
55 | 55 | ||
56 | public FetchInvDescHandler(IInventoryService invService, ILibraryService libService, IScene s) | 56 | public FetchInvDescHandler(IInventoryService invService, ILibraryService libService, IScene s) |
57 | { | 57 | { |
58 | m_InventoryService = invService; | 58 | m_InventoryService = invService; |
59 | m_LibraryService = libService; | 59 | m_LibraryService = libService; |
60 | m_Scene = s; | 60 | m_Scene = s; |
61 | } | 61 | } |
62 | 62 | ||
63 | 63 | ||
64 | public string FetchInventoryDescendentsRequest(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 64 | public string FetchInventoryDescendentsRequest(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
65 | { | 65 | { |
66 | //m_log.DebugFormat("[XXX]: FetchInventoryDescendentsRequest in {0}, {1}", (m_Scene == null) ? "none" : m_Scene.Name, request); | 66 | //m_log.DebugFormat("[XXX]: FetchInventoryDescendentsRequest in {0}, {1}", (m_Scene == null) ? "none" : m_Scene.Name, request); |
@@ -72,14 +72,14 @@ namespace OpenSim.Capabilities.Handlers | |||
72 | // correctly mark it as a uuid | 72 | // correctly mark it as a uuid |
73 | // | 73 | // |
74 | request = request.Replace("<string>00000000-0000-0000-0000-000000000000</string>", "<uuid>00000000-0000-0000-0000-000000000000</uuid>"); | 74 | request = request.Replace("<string>00000000-0000-0000-0000-000000000000</string>", "<uuid>00000000-0000-0000-0000-000000000000</uuid>"); |
75 | 75 | ||
76 | // another hack <integer>1</integer> results in a | 76 | // another hack <integer>1</integer> results in a |
77 | // System.ArgumentException: Object type System.Int32 cannot | 77 | // System.ArgumentException: Object type System.Int32 cannot |
78 | // be converted to target type: System.Boolean | 78 | // be converted to target type: System.Boolean |
79 | // | 79 | // |
80 | request = request.Replace("<key>fetch_folders</key><integer>0</integer>", "<key>fetch_folders</key><boolean>0</boolean>"); | 80 | request = request.Replace("<key>fetch_folders</key><integer>0</integer>", "<key>fetch_folders</key><boolean>0</boolean>"); |
81 | request = request.Replace("<key>fetch_folders</key><integer>1</integer>", "<key>fetch_folders</key><boolean>1</boolean>"); | 81 | request = request.Replace("<key>fetch_folders</key><integer>1</integer>", "<key>fetch_folders</key><boolean>1</boolean>"); |
82 | 82 | ||
83 | Hashtable hash = new Hashtable(); | 83 | Hashtable hash = new Hashtable(); |
84 | try | 84 | try |
85 | { | 85 | { |
@@ -90,9 +90,9 @@ namespace OpenSim.Capabilities.Handlers | |||
90 | m_log.ErrorFormat("[WEB FETCH INV DESC HANDLER]: Fetch error: {0}{1}" + e.Message, e.StackTrace); | 90 | m_log.ErrorFormat("[WEB FETCH INV DESC HANDLER]: Fetch error: {0}{1}" + e.Message, e.StackTrace); |
91 | m_log.Error("Request: " + request); | 91 | m_log.Error("Request: " + request); |
92 | } | 92 | } |
93 | 93 | ||
94 | ArrayList foldersrequested = (ArrayList)hash["folders"]; | 94 | ArrayList foldersrequested = (ArrayList)hash["folders"]; |
95 | 95 | ||
96 | string response = ""; | 96 | string response = ""; |
97 | string bad_folders_response = ""; | 97 | string bad_folders_response = ""; |
98 | 98 | ||
@@ -516,7 +516,7 @@ from docs seems this was never a spec | |||
516 | // } | 516 | // } |
517 | // } | 517 | // } |
518 | // } | 518 | // } |
519 | // | 519 | // |
520 | // foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend) | 520 | // foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend) |
521 | // { | 521 | // { |
522 | // m_log.DebugFormat( | 522 | // m_log.DebugFormat( |
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs index 8200a96..e239a90 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs | |||
@@ -80,7 +80,7 @@ namespace OpenSim.Capabilities.Handlers | |||
80 | { | 80 | { |
81 | // OMG!!! One by one!!! This is fallback code, in case the backend isn't updated | 81 | // OMG!!! One by one!!! This is fallback code, in case the backend isn't updated |
82 | m_log.WarnFormat("[FETCH INVENTORY HANDLER]: GetMultipleItems failed. Falling back to fetching inventory items one by one."); | 82 | m_log.WarnFormat("[FETCH INVENTORY HANDLER]: GetMultipleItems failed. Falling back to fetching inventory items one by one."); |
83 | items = new InventoryItemBase[itemsRequested.Count]; | 83 | items = new InventoryItemBase[itemsRequested.Count]; |
84 | foreach (UUID id in itemIDs) | 84 | foreach (UUID id in itemIDs) |
85 | items[i++] = m_inventoryService.GetItem(m_agentID, id); | 85 | items[i++] = m_inventoryService.GetItem(m_agentID, id); |
86 | } | 86 | } |
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventory2HandlerTests.cs b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventory2HandlerTests.cs index 8af3c64..94c2c89 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventory2HandlerTests.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventory2HandlerTests.cs | |||
@@ -120,7 +120,7 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests | |||
120 | string request = "<llsd><map><key>items</key><array><map><key>item_id</key><uuid>"; | 120 | string request = "<llsd><map><key>items</key><array><map><key>item_id</key><uuid>"; |
121 | request += "10000000-0000-0000-0000-000000000001"; // Notecard 1 | 121 | request += "10000000-0000-0000-0000-000000000001"; // Notecard 1 |
122 | request += "</uuid></map></array></map></llsd>"; | 122 | request += "</uuid></map></array></map></llsd>"; |
123 | 123 | ||
124 | string llsdresponse = handler.FetchInventoryRequest(request, "/FETCH", string.Empty, req, resp); | 124 | string llsdresponse = handler.FetchInventoryRequest(request, "/FETCH", string.Empty, req, resp); |
125 | 125 | ||
126 | Assert.That(llsdresponse != null, Is.True, "Incorrect null response"); | 126 | Assert.That(llsdresponse != null, Is.True, "Incorrect null response"); |
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs index 94eef3b..4143aa3 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs | |||
@@ -140,7 +140,7 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests | |||
140 | string request = "<llsd><map><key>folders</key><array><map><key>fetch_folders</key><integer>1</integer><key>fetch_items</key><boolean>1</boolean><key>folder_id</key><uuid>"; | 140 | string request = "<llsd><map><key>folders</key><array><map><key>fetch_folders</key><integer>1</integer><key>fetch_items</key><boolean>1</boolean><key>folder_id</key><uuid>"; |
141 | request += m_rootFolderID; | 141 | request += m_rootFolderID; |
142 | request += "</uuid><key>owner_id</key><uuid>00000000-0000-0000-0000-000000000000</uuid><key>sort_order</key><integer>1</integer></map></array></map></llsd>"; | 142 | request += "</uuid><key>owner_id</key><uuid>00000000-0000-0000-0000-000000000000</uuid><key>sort_order</key><integer>1</integer></map></array></map></llsd>"; |
143 | 143 | ||
144 | string llsdresponse = handler.FetchInventoryDescendentsRequest(request, "/FETCH", string.Empty, req, resp); | 144 | string llsdresponse = handler.FetchInventoryDescendentsRequest(request, "/FETCH", string.Empty, req, resp); |
145 | 145 | ||
146 | Assert.That(llsdresponse != null, Is.True, "Incorrect null response"); | 146 | Assert.That(llsdresponse != null, Is.True, "Incorrect null response"); |
@@ -203,7 +203,7 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests | |||
203 | 203 | ||
204 | // Make sure that the note card link is included | 204 | // Make sure that the note card link is included |
205 | Assert.That(llsdresponse.Contains("Link to notecard"), Is.True, "Link to notecard is missing"); | 205 | Assert.That(llsdresponse.Contains("Link to notecard"), Is.True, "Link to notecard is missing"); |
206 | 206 | ||
207 | //Make sure the notecard item itself is included | 207 | //Make sure the notecard item itself is included |
208 | Assert.That(llsdresponse.Contains("Test Notecard 2"), Is.True, "Notecard 2 item (the source) is missing"); | 208 | Assert.That(llsdresponse.Contains("Test Notecard 2"), Is.True, "Notecard 2 item (the source) is missing"); |
209 | 209 | ||