diff options
Diffstat (limited to 'OpenSim/Framework/Communications/CommunicationsManager.cs')
-rw-r--r-- | OpenSim/Framework/Communications/CommunicationsManager.cs | 52 |
1 files changed, 50 insertions, 2 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 8caeeb3..80dfa2c 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -112,11 +112,23 @@ namespace OpenSim.Framework.Communications | |||
112 | 112 | ||
113 | protected List<IInventoryServices> m_inventoryServices = new List<IInventoryServices>(); | 113 | protected List<IInventoryServices> m_inventoryServices = new List<IInventoryServices>(); |
114 | // protected IInventoryServices m_inventoryService; | 114 | // protected IInventoryServices m_inventoryService; |
115 | protected ISecureInventoryService m_secureinventoryServices; | 115 | protected List<ISecureInventoryService> m_secureinventoryServices = new List<ISecureInventoryService>(); |
116 | 116 | ||
117 | public ISecureInventoryService SecureInventoryService | 117 | public ISecureInventoryService SecureInventoryService |
118 | { | 118 | { |
119 | get { return m_secureinventoryServices; } | 119 | get |
120 | { | ||
121 | if (m_secureinventoryServices.Count > 0) | ||
122 | { | ||
123 | // return m_inventoryServices[0]; | ||
124 | ISecureInventoryService invService; | ||
125 | if (TryGetSecureInventoryService(m_defaultInventoryHost, out invService)) | ||
126 | { | ||
127 | return invService; | ||
128 | } | ||
129 | } | ||
130 | return null; | ||
131 | } | ||
120 | } | 132 | } |
121 | 133 | ||
122 | public IInventoryServices InventoryService | 134 | public IInventoryServices InventoryService |
@@ -136,6 +148,29 @@ namespace OpenSim.Framework.Communications | |||
136 | } | 148 | } |
137 | } | 149 | } |
138 | 150 | ||
151 | public bool TryGetSecureInventoryService(string host, out ISecureInventoryService inventoryService) | ||
152 | { | ||
153 | if ((host == string.Empty) || (host == "default")) | ||
154 | { | ||
155 | host = m_defaultInventoryHost; | ||
156 | } | ||
157 | |||
158 | lock (m_secureinventoryServices) | ||
159 | { | ||
160 | foreach (ISecureInventoryService service in m_secureinventoryServices) | ||
161 | { | ||
162 | if (service.Host == host) | ||
163 | { | ||
164 | inventoryService = service; | ||
165 | return true; | ||
166 | } | ||
167 | } | ||
168 | } | ||
169 | |||
170 | inventoryService = null; | ||
171 | return false; | ||
172 | } | ||
173 | |||
139 | public bool TryGetInventoryService(string host, out IInventoryServices inventoryService) | 174 | public bool TryGetInventoryService(string host, out IInventoryServices inventoryService) |
140 | { | 175 | { |
141 | if ((host == string.Empty) || (host == "default")) | 176 | if ((host == string.Empty) || (host == "default")) |
@@ -164,6 +199,19 @@ namespace OpenSim.Framework.Communications | |||
164 | 199 | ||
165 | } | 200 | } |
166 | 201 | ||
202 | public virtual void AddSecureInventoryService(string hostUrl) | ||
203 | { | ||
204 | |||
205 | } | ||
206 | |||
207 | public virtual void AddSecureInventoryService(ISecureInventoryService service) | ||
208 | { | ||
209 | lock (m_secureinventoryServices) | ||
210 | { | ||
211 | m_secureinventoryServices.Add(service); | ||
212 | } | ||
213 | } | ||
214 | |||
167 | public virtual void AddInventoryService(IInventoryServices service) | 215 | public virtual void AddInventoryService(IInventoryServices service) |
168 | { | 216 | { |
169 | lock (m_inventoryServices) | 217 | lock (m_inventoryServices) |