diff options
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs b/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs index 87d3d1c..e0a11cc 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs | |||
@@ -25,20 +25,16 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | ||
29 | using System.Collections; | ||
30 | using System.Reflection; | ||
31 | using log4net; | ||
32 | using Nini.Config; | ||
33 | using Mono.Addins; | 28 | using Mono.Addins; |
29 | using Nini.Config; | ||
34 | using OpenMetaverse; | 30 | using OpenMetaverse; |
35 | using OpenSim.Framework; | 31 | using OpenSim.Capabilities.Handlers; |
36 | using OpenSim.Framework.Servers.HttpServer; | 32 | using OpenSim.Framework.Servers.HttpServer; |
37 | using OpenSim.Region.Framework.Interfaces; | 33 | using OpenSim.Region.Framework.Interfaces; |
38 | using OpenSim.Region.Framework.Scenes; | 34 | using OpenSim.Region.Framework.Scenes; |
39 | using OpenSim.Services.Interfaces; | 35 | using OpenSim.Services.Interfaces; |
36 | using System; | ||
40 | using Caps = OpenSim.Framework.Capabilities.Caps; | 37 | using Caps = OpenSim.Framework.Capabilities.Caps; |
41 | using OpenSim.Capabilities.Handlers; | ||
42 | 38 | ||
43 | namespace OpenSim.Region.ClientStack.Linden | 39 | namespace OpenSim.Region.ClientStack.Linden |
44 | { | 40 | { |
@@ -58,8 +54,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
58 | 54 | ||
59 | private string m_fetchInventory2Url; | 55 | private string m_fetchInventory2Url; |
60 | 56 | ||
61 | private FetchInventory2Handler m_fetchHandler; | ||
62 | |||
63 | #region ISharedRegionModule Members | 57 | #region ISharedRegionModule Members |
64 | 58 | ||
65 | public void Initialise(IConfigSource source) | 59 | public void Initialise(IConfigSource source) |
@@ -98,10 +92,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
98 | 92 | ||
99 | m_inventoryService = m_scene.InventoryService; | 93 | m_inventoryService = m_scene.InventoryService; |
100 | 94 | ||
101 | // We'll reuse the same handler for all requests. | ||
102 | if (m_fetchInventory2Url == "localhost") | ||
103 | m_fetchHandler = new FetchInventory2Handler(m_inventoryService); | ||
104 | |||
105 | m_scene.EventManager.OnRegisterCaps += RegisterCaps; | 95 | m_scene.EventManager.OnRegisterCaps += RegisterCaps; |
106 | } | 96 | } |
107 | 97 | ||
@@ -131,9 +121,11 @@ namespace OpenSim.Region.ClientStack.Linden | |||
131 | { | 121 | { |
132 | capUrl = "/CAPS/" + UUID.Random(); | 122 | capUrl = "/CAPS/" + UUID.Random(); |
133 | 123 | ||
124 | FetchInventory2Handler fetchHandler = new FetchInventory2Handler(m_inventoryService, agentID); | ||
125 | |||
134 | IRequestHandler reqHandler | 126 | IRequestHandler reqHandler |
135 | = new RestStreamHandler( | 127 | = new RestStreamHandler( |
136 | "POST", capUrl, m_fetchHandler.FetchInventoryRequest, capName, agentID.ToString()); | 128 | "POST", capUrl, fetchHandler.FetchInventoryRequest, capName, agentID.ToString()); |
137 | 129 | ||
138 | caps.RegisterHandler(capName, reqHandler); | 130 | caps.RegisterHandler(capName, reqHandler); |
139 | } | 131 | } |