diff options
7 files changed, 2 insertions, 192 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index e1a70e5..e9a6adb 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -109,120 +109,6 @@ namespace OpenSim.Framework.Communications | |||
109 | m_userProfileCacheService = new UserProfileCacheService(this, libraryRootFolder); | 109 | m_userProfileCacheService = new UserProfileCacheService(this, libraryRootFolder); |
110 | } | 110 | } |
111 | 111 | ||
112 | #region Inventory | ||
113 | protected string m_defaultInventoryHost = "default"; | ||
114 | |||
115 | protected List<IInventoryServices> m_inventoryServices = new List<IInventoryServices>(); | ||
116 | // protected IInventoryServices m_inventoryService; | ||
117 | protected List<ISecureInventoryService> m_secureinventoryServices = new List<ISecureInventoryService>(); | ||
118 | |||
119 | public ISecureInventoryService SecureInventoryService | ||
120 | { | ||
121 | get | ||
122 | { | ||
123 | if (m_secureinventoryServices.Count > 0) | ||
124 | { | ||
125 | // return m_inventoryServices[0]; | ||
126 | ISecureInventoryService invService; | ||
127 | if (TryGetSecureInventoryService(m_defaultInventoryHost, out invService)) | ||
128 | { | ||
129 | return invService; | ||
130 | } | ||
131 | } | ||
132 | return null; | ||
133 | } | ||
134 | } | ||
135 | |||
136 | public IInventoryServices InventoryService | ||
137 | { | ||
138 | get | ||
139 | { | ||
140 | if (m_inventoryServices.Count > 0) | ||
141 | { | ||
142 | // return m_inventoryServices[0]; | ||
143 | IInventoryServices invService; | ||
144 | if (TryGetInventoryService(m_defaultInventoryHost, out invService)) | ||
145 | { | ||
146 | return invService; | ||
147 | } | ||
148 | } | ||
149 | return null; | ||
150 | } | ||
151 | } | ||
152 | |||
153 | public bool TryGetSecureInventoryService(string host, out ISecureInventoryService inventoryService) | ||
154 | { | ||
155 | if ((host == string.Empty) || (host == "default")) | ||
156 | { | ||
157 | host = m_defaultInventoryHost; | ||
158 | } | ||
159 | |||
160 | lock (m_secureinventoryServices) | ||
161 | { | ||
162 | foreach (ISecureInventoryService service in m_secureinventoryServices) | ||
163 | { | ||
164 | if (service.Host == host) | ||
165 | { | ||
166 | inventoryService = service; | ||
167 | return true; | ||
168 | } | ||
169 | } | ||
170 | } | ||
171 | |||
172 | inventoryService = null; | ||
173 | return false; | ||
174 | } | ||
175 | |||
176 | public bool TryGetInventoryService(string host, out IInventoryServices inventoryService) | ||
177 | { | ||
178 | if ((host == string.Empty) || (host == "default")) | ||
179 | { | ||
180 | host = m_defaultInventoryHost; | ||
181 | } | ||
182 | |||
183 | lock (m_inventoryServices) | ||
184 | { | ||
185 | foreach (IInventoryServices service in m_inventoryServices) | ||
186 | { | ||
187 | if (service.Host == host) | ||
188 | { | ||
189 | inventoryService = service; | ||
190 | return true; | ||
191 | } | ||
192 | } | ||
193 | } | ||
194 | |||
195 | inventoryService = null; | ||
196 | return false; | ||
197 | } | ||
198 | |||
199 | public virtual void AddInventoryService(string hostUrl) | ||
200 | { | ||
201 | |||
202 | } | ||
203 | |||
204 | public virtual void AddSecureInventoryService(string hostUrl) | ||
205 | { | ||
206 | |||
207 | } | ||
208 | |||
209 | public virtual void AddSecureInventoryService(ISecureInventoryService service) | ||
210 | { | ||
211 | lock (m_secureinventoryServices) | ||
212 | { | ||
213 | m_secureinventoryServices.Add(service); | ||
214 | } | ||
215 | } | ||
216 | |||
217 | public virtual void AddInventoryService(IInventoryServices service) | ||
218 | { | ||
219 | lock (m_inventoryServices) | ||
220 | { | ||
221 | m_inventoryServices.Add(service); | ||
222 | } | ||
223 | } | ||
224 | |||
225 | #endregion | ||
226 | 112 | ||
227 | #region Friend Methods | 113 | #region Friend Methods |
228 | 114 | ||
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 6ea04cf..aeb6f57 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -656,7 +656,7 @@ namespace OpenSim | |||
656 | case "Add-InventoryHost": | 656 | case "Add-InventoryHost": |
657 | if (cmdparams.Length > 0) | 657 | if (cmdparams.Length > 0) |
658 | { | 658 | { |
659 | m_commsManager.AddInventoryService(cmdparams[0]); | 659 | m_log.Info("Not implemented."); |
660 | } | 660 | } |
661 | break; | 661 | break; |
662 | 662 | ||
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs index 0e7ab9b..99a4057 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsGridMode.cs | |||
@@ -59,16 +59,6 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
59 | m_gridService = gridInterComms; | 59 | m_gridService = gridInterComms; |
60 | m_osw = gridInterComms; | 60 | m_osw = gridInterComms; |
61 | 61 | ||
62 | // The HG InventoryService always uses secure handlers | ||
63 | HGInventoryServiceClient invService = new HGInventoryServiceClient(serversInfo.InventoryURL, this.m_userProfileCacheService, true); | ||
64 | invService.UserProfileCache = m_userProfileCacheService; | ||
65 | AddSecureInventoryService(invService); | ||
66 | m_defaultInventoryHost = invService.Host; | ||
67 | if (SecureInventoryService != null) | ||
68 | m_log.Info("[HG]: SecureInventoryService."); | ||
69 | else | ||
70 | m_log.Info("[HG]: Non-secureInventoryService."); | ||
71 | |||
72 | HGUserServices userServices = new HGUserServices(this); | 62 | HGUserServices userServices = new HGUserServices(this); |
73 | // This plugin arrangement could eventually be configurable rather than hardcoded here. | 63 | // This plugin arrangement could eventually be configurable rather than hardcoded here. |
74 | userServices.AddPlugin(new TemporaryUserProfilePlugin()); | 64 | userServices.AddPlugin(new TemporaryUserProfilePlugin()); |
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs index 1bfc736..568437d 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs | |||
@@ -53,28 +53,6 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
53 | new LocalUserServices( | 53 | new LocalUserServices( |
54 | serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); | 54 | serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); |
55 | localUserService.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource); | 55 | localUserService.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource); |
56 | |||
57 | HGInventoryServiceClient inventoryService | ||
58 | = new HGInventoryServiceClient(serversInfo.InventoryURL, null, false); | ||
59 | List<IInventoryDataPlugin> plugins | ||
60 | = DataPluginFactory.LoadDataPlugins<IInventoryDataPlugin>( | ||
61 | configSettings.StandaloneInventoryPlugin, | ||
62 | configSettings.StandaloneInventorySource); | ||
63 | |||
64 | foreach (IInventoryDataPlugin plugin in plugins) | ||
65 | { | ||
66 | // Using the OSP wrapper plugin should be made configurable at some point | ||
67 | inventoryService.AddPlugin(new OspInventoryWrapperPlugin(plugin, this)); | ||
68 | } | ||
69 | |||
70 | AddInventoryService(inventoryService); | ||
71 | m_defaultInventoryHost = inventoryService.Host; | ||
72 | m_interServiceInventoryService = inventoryService; | ||
73 | inventoryService.UserProfileCache = UserProfileCacheService; | ||
74 | |||
75 | // Let's swap to always be secure access to inventory | ||
76 | AddSecureInventoryService((ISecureInventoryService)inventoryService); | ||
77 | m_inventoryServices = null; | ||
78 | 56 | ||
79 | HGUserServices hgUserService = new HGUserServices(this, localUserService); | 57 | HGUserServices hgUserService = new HGUserServices(this, localUserService); |
80 | // This plugin arrangement could eventually be configurable rather than hardcoded here. | 58 | // This plugin arrangement could eventually be configurable rather than hardcoded here. |
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index ceab75b..a658416 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs | |||
@@ -42,22 +42,7 @@ namespace OpenSim.Region.Communications.Local | |||
42 | LibraryRootFolder libraryRootFolder) | 42 | LibraryRootFolder libraryRootFolder) |
43 | : base(serversInfo, libraryRootFolder) | 43 | : base(serversInfo, libraryRootFolder) |
44 | { | 44 | { |
45 | LocalInventoryService inventoryService = new LocalInventoryService(); | 45 | |
46 | List<IInventoryDataPlugin> plugins | ||
47 | = DataPluginFactory.LoadDataPlugins<IInventoryDataPlugin>( | ||
48 | configSettings.StandaloneInventoryPlugin, | ||
49 | configSettings.StandaloneInventorySource); | ||
50 | |||
51 | foreach (IInventoryDataPlugin plugin in plugins) | ||
52 | { | ||
53 | // Using the OSP wrapper plugin for database plugins should be made configurable at some point | ||
54 | inventoryService.AddPlugin(new OspInventoryWrapperPlugin(plugin, this)); | ||
55 | } | ||
56 | |||
57 | AddInventoryService(inventoryService); | ||
58 | m_defaultInventoryHost = inventoryService.Host; | ||
59 | m_interServiceInventoryService = inventoryService; | ||
60 | |||
61 | LocalUserServices lus | 46 | LocalUserServices lus |
62 | = new LocalUserServices( | 47 | = new LocalUserServices( |
63 | serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); | 48 | serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); |
diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs index 323f813..8b5779f 100644 --- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs +++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs | |||
@@ -42,19 +42,6 @@ namespace OpenSim.Region.Communications.OGS1 | |||
42 | OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo); | 42 | OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo); |
43 | m_gridService = gridInterComms; | 43 | m_gridService = gridInterComms; |
44 | 44 | ||
45 | if (serversInfo.secureInventoryServer) | ||
46 | { | ||
47 | OGS1SecureInventoryService invService = new OGS1SecureInventoryService(serversInfo.InventoryURL); | ||
48 | AddSecureInventoryService(invService); | ||
49 | m_defaultInventoryHost = invService.Host; | ||
50 | } | ||
51 | else | ||
52 | { | ||
53 | OGS1InventoryService invService = new OGS1InventoryService(serversInfo.InventoryURL); | ||
54 | AddInventoryService(invService); | ||
55 | m_defaultInventoryHost = invService.Host; | ||
56 | } | ||
57 | |||
58 | // This plugin arrangement could eventually be configurable rather than hardcoded here. | 45 | // This plugin arrangement could eventually be configurable rather than hardcoded here. |
59 | OGS1UserServices userServices = new OGS1UserServices(this); | 46 | OGS1UserServices userServices = new OGS1UserServices(this); |
60 | userServices.AddPlugin(new TemporaryUserProfilePlugin()); | 47 | userServices.AddPlugin(new TemporaryUserProfilePlugin()); |
@@ -65,16 +52,5 @@ namespace OpenSim.Region.Communications.OGS1 | |||
65 | m_avatarService = (IAvatarService)m_userService; | 52 | m_avatarService = (IAvatarService)m_userService; |
66 | } | 53 | } |
67 | 54 | ||
68 | public override void AddInventoryService(string hostUrl) | ||
69 | { | ||
70 | OGS1InventoryService invService = new OGS1InventoryService(hostUrl); | ||
71 | AddInventoryService(invService); | ||
72 | } | ||
73 | |||
74 | public override void AddSecureInventoryService(string hostUrl) | ||
75 | { | ||
76 | OGS1SecureInventoryService invService = new OGS1SecureInventoryService(hostUrl); | ||
77 | AddSecureInventoryService(invService); | ||
78 | } | ||
79 | } | 55 | } |
80 | } | 56 | } |
diff --git a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs index 87751a4..d404344 100644 --- a/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs +++ b/OpenSim/Tests/Common/Mock/TestCommunicationsManager.cs | |||
@@ -57,11 +57,6 @@ namespace OpenSim.Tests.Common.Mock | |||
57 | public TestCommunicationsManager(NetworkServersInfo serversInfo) | 57 | public TestCommunicationsManager(NetworkServersInfo serversInfo) |
58 | : base(serversInfo, null) | 58 | : base(serversInfo, null) |
59 | { | 59 | { |
60 | LocalInventoryService lis = new LocalInventoryService(); | ||
61 | m_inventoryDataPlugin = new TestInventoryDataPlugin(); | ||
62 | lis.AddPlugin(m_inventoryDataPlugin); | ||
63 | m_interServiceInventoryService = lis; | ||
64 | AddInventoryService(lis); | ||
65 | 60 | ||
66 | LocalUserServices lus = new LocalUserServices(991, 992, this); | 61 | LocalUserServices lus = new LocalUserServices(991, 992, this); |
67 | lus.AddPlugin(new TemporaryUserProfilePlugin()); | 62 | lus.AddPlugin(new TemporaryUserProfilePlugin()); |