diff options
author | Melanie | 2011-02-05 04:25:14 +0000 |
---|---|---|
committer | Melanie | 2011-02-05 04:25:14 +0000 |
commit | f78831ec9841eccea9ecb4077193e2ae7c3985c3 (patch) | |
tree | b6118825d9dd4ebfc1f1f1f966009ac30b293af5 /OpenSim/Region | |
parent | Fix a typo in the QUERYACCESS method name (diff) | |
parent | Added an additional debug message, and removed a bunch of files that weren't ... (diff) | |
download | opensim-SC-f78831ec9841eccea9ecb4077193e2ae7c3985c3.zip opensim-SC-f78831ec9841eccea9ecb4077193e2ae7c3985c3.tar.gz opensim-SC-f78831ec9841eccea9ecb4077193e2ae7c3985c3.tar.bz2 opensim-SC-f78831ec9841eccea9ecb4077193e2ae7c3985c3.tar.xz |
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to '')
10 files changed, 64 insertions, 405 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index 1a96098..26edba4 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs | |||
@@ -128,6 +128,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
128 | + "<last> is the user's last name." + Environment.NewLine | 128 | + "<last> is the user's last name." + Environment.NewLine |
129 | + "<inventory path> is the path inside the user's inventory for the folder/item to be saved." + Environment.NewLine | 129 | + "<inventory path> is the path inside the user's inventory for the folder/item to be saved." + Environment.NewLine |
130 | + "-p|--profile=<url> adds the url of the profile service to the saved user information." + Environment.NewLine | 130 | + "-p|--profile=<url> adds the url of the profile service to the saved user information." + Environment.NewLine |
131 | + "-c|--creators preserves information about foreign creators." + Environment.NewLine | ||
131 | + "-v|--verbose extra debug messages." + Environment.NewLine | 132 | + "-v|--verbose extra debug messages." + Environment.NewLine |
132 | + "<IAR path> is the filesystem path at which to save the IAR." | 133 | + "<IAR path> is the filesystem path at which to save the IAR." |
133 | + string.Format(" If this is not given then the filename {0} in the current directory is used", DEFAULT_INV_BACKUP_FILENAME), | 134 | + string.Format(" If this is not given then the filename {0} in the current directory is used", DEFAULT_INV_BACKUP_FILENAME), |
@@ -396,6 +397,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
396 | //ops.Add("v|version=", delegate(string v) { options["version"] = v; }); | 397 | //ops.Add("v|version=", delegate(string v) { options["version"] = v; }); |
397 | ops.Add("p|profile=", delegate(string v) { options["profile"] = v; }); | 398 | ops.Add("p|profile=", delegate(string v) { options["profile"] = v; }); |
398 | ops.Add("v|verbose", delegate(string v) { options["verbose"] = v; }); | 399 | ops.Add("v|verbose", delegate(string v) { options["verbose"] = v; }); |
400 | ops.Add("c|creators", delegate(string v) { options["creators"] = v; }); | ||
399 | 401 | ||
400 | List<string> mainParams = ops.Parse(cmdparams); | 402 | List<string> mainParams = ops.Parse(cmdparams); |
401 | 403 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 54b95f7..80a8041 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -983,7 +983,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
983 | /// </summary> | 983 | /// </summary> |
984 | public void EnableChildAgent(ScenePresence sp, GridRegion region) | 984 | public void EnableChildAgent(ScenePresence sp, GridRegion region) |
985 | { | 985 | { |
986 | m_log.DebugFormat("[ENTITY TRANSFER]: Enabling child agent in new neighour {0}", region.RegionName); | 986 | m_log.DebugFormat("[ENTITY TRANSFER]: Enabling child agent in new neighbour {0}", region.RegionName); |
987 | 987 | ||
988 | AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); | 988 | AgentCircuitData currentAgentCircuit = sp.Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); |
989 | AgentCircuitData agent = sp.ControllingClient.RequestClientInfo(); | 989 | AgentCircuitData agent = sp.ControllingClient.RequestClientInfo(); |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 34b8114..4565d10 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | |||
@@ -55,6 +55,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
55 | } | 55 | } |
56 | 56 | ||
57 | private string m_ProfileServerURI; | 57 | private string m_ProfileServerURI; |
58 | private bool m_OutboundPermission; | ||
58 | 59 | ||
59 | // private bool m_Initialized = false; | 60 | // private bool m_Initialized = false; |
60 | 61 | ||
@@ -78,7 +79,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
78 | 79 | ||
79 | IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"]; | 80 | IConfig thisModuleConfig = source.Configs["HGInventoryAccessModule"]; |
80 | if (thisModuleConfig != null) | 81 | if (thisModuleConfig != null) |
82 | { | ||
81 | m_ProfileServerURI = thisModuleConfig.GetString("ProfileServerURI", string.Empty); | 83 | m_ProfileServerURI = thisModuleConfig.GetString("ProfileServerURI", string.Empty); |
84 | m_OutboundPermission = thisModuleConfig.GetBoolean("OutboundPermission", true); | ||
85 | } | ||
82 | else | 86 | else |
83 | m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!"); | 87 | m_log.Warn("[HG INVENTORY ACCESS MODULE]: HGInventoryAccessModule configs not found. ProfileServerURI not set!"); |
84 | } | 88 | } |
@@ -103,7 +107,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
103 | public void UploadInventoryItem(UUID avatarID, UUID assetID, string name, int userlevel) | 107 | public void UploadInventoryItem(UUID avatarID, UUID assetID, string name, int userlevel) |
104 | { | 108 | { |
105 | string userAssetServer = string.Empty; | 109 | string userAssetServer = string.Empty; |
106 | if (IsForeignUser(avatarID, out userAssetServer)) | 110 | if (IsForeignUser(avatarID, out userAssetServer) && m_OutboundPermission) |
107 | { | 111 | { |
108 | Util.FireAndForget(delegate { m_assMapper.Post(assetID, avatarID, userAssetServer); }); | 112 | Util.FireAndForget(delegate { m_assMapper.Post(assetID, avatarID, userAssetServer); }); |
109 | } | 113 | } |
@@ -197,7 +201,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
197 | if (IsForeignUser(sender, out userAssetServer)) | 201 | if (IsForeignUser(sender, out userAssetServer)) |
198 | m_assMapper.Get(item.AssetID, sender, userAssetServer); | 202 | m_assMapper.Get(item.AssetID, sender, userAssetServer); |
199 | 203 | ||
200 | if (IsForeignUser(receiver, out userAssetServer)) | 204 | if (IsForeignUser(receiver, out userAssetServer) && m_OutboundPermission) |
201 | m_assMapper.Post(item.AssetID, receiver, userAssetServer); | 205 | m_assMapper.Post(item.AssetID, receiver, userAssetServer); |
202 | } | 206 | } |
203 | 207 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index 39410b5..3f63db3 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |||
@@ -200,6 +200,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
200 | return; | 200 | return; |
201 | } | 201 | } |
202 | } | 202 | } |
203 | else | ||
204 | { | ||
205 | m_log.DebugFormat("[HG INVENTORY CONNECTOR]: User {0} does not have InventoryServerURI. OH NOES!", userID); | ||
206 | return; | ||
207 | } | ||
203 | } | 208 | } |
204 | } | 209 | } |
205 | } | 210 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs deleted file mode 100644 index 9213132..0000000 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs +++ /dev/null | |||
@@ -1,362 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using log4net; | ||
29 | using System; | ||
30 | using System.Collections.Generic; | ||
31 | using System.Reflection; | ||
32 | using Nini.Config; | ||
33 | using OpenSim.Framework; | ||
34 | using OpenSim.Framework.Statistics; | ||
35 | using OpenSim.Services.Connectors; | ||
36 | using OpenSim.Region.Framework.Interfaces; | ||
37 | using OpenSim.Region.Framework.Scenes; | ||
38 | using OpenSim.Services.Interfaces; | ||
39 | using OpenMetaverse; | ||
40 | |||
41 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | ||
42 | { | ||
43 | public class RemoteInventoryServicesConnector : BaseInventoryConnector, ISharedRegionModule, IInventoryService | ||
44 | { | ||
45 | private static readonly ILog m_log = | ||
46 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
47 | |||
48 | private bool m_Enabled = false; | ||
49 | private bool m_Initialized = false; | ||
50 | private Scene m_Scene; | ||
51 | private InventoryServicesConnector m_RemoteConnector; | ||
52 | |||
53 | private IUserManagement m_UserManager; | ||
54 | private IUserManagement UserManager | ||
55 | { | ||
56 | get | ||
57 | { | ||
58 | if (m_UserManager == null) | ||
59 | { | ||
60 | m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>(); | ||
61 | } | ||
62 | return m_UserManager; | ||
63 | } | ||
64 | } | ||
65 | |||
66 | |||
67 | public Type ReplaceableInterface | ||
68 | { | ||
69 | get { return null; } | ||
70 | } | ||
71 | |||
72 | public string Name | ||
73 | { | ||
74 | get { return "RemoteInventoryServicesConnector"; } | ||
75 | } | ||
76 | |||
77 | public RemoteInventoryServicesConnector() | ||
78 | { | ||
79 | } | ||
80 | |||
81 | public RemoteInventoryServicesConnector(IConfigSource source) | ||
82 | { | ||
83 | Init(source); | ||
84 | } | ||
85 | |||
86 | protected override void Init(IConfigSource source) | ||
87 | { | ||
88 | m_RemoteConnector = new InventoryServicesConnector(source); | ||
89 | base.Init(source); | ||
90 | } | ||
91 | |||
92 | #region ISharedRegionModule | ||
93 | |||
94 | public void Initialise(IConfigSource source) | ||
95 | { | ||
96 | IConfig moduleConfig = source.Configs["Modules"]; | ||
97 | if (moduleConfig != null) | ||
98 | { | ||
99 | string name = moduleConfig.GetString("InventoryServices", ""); | ||
100 | if (name == Name) | ||
101 | { | ||
102 | Init(source); | ||
103 | m_Enabled = true; | ||
104 | |||
105 | m_log.Info("[INVENTORY CONNECTOR]: Remote inventory enabled"); | ||
106 | } | ||
107 | } | ||
108 | } | ||
109 | |||
110 | public void PostInitialise() | ||
111 | { | ||
112 | } | ||
113 | |||
114 | public void Close() | ||
115 | { | ||
116 | } | ||
117 | |||
118 | public void AddRegion(Scene scene) | ||
119 | { | ||
120 | // m_Scene = scene; | ||
121 | //m_log.Debug("[XXXX] Adding scene " + m_Scene.RegionInfo.RegionName); | ||
122 | |||
123 | if (!m_Enabled) | ||
124 | return; | ||
125 | |||
126 | if (!m_Initialized) | ||
127 | { | ||
128 | m_Initialized = true; | ||
129 | } | ||
130 | |||
131 | scene.RegisterModuleInterface<IInventoryService>(this); | ||
132 | m_cache.AddRegion(scene); | ||
133 | |||
134 | if (m_Scene == null) | ||
135 | m_Scene = scene; | ||
136 | } | ||
137 | |||
138 | public void RemoveRegion(Scene scene) | ||
139 | { | ||
140 | if (!m_Enabled) | ||
141 | return; | ||
142 | |||
143 | m_cache.RemoveRegion(scene); | ||
144 | } | ||
145 | |||
146 | public void RegionLoaded(Scene scene) | ||
147 | { | ||
148 | if (!m_Enabled) | ||
149 | return; | ||
150 | |||
151 | m_log.InfoFormat("[INVENTORY CONNECTOR]: Enabled remote inventory for region {0}", scene.RegionInfo.RegionName); | ||
152 | |||
153 | } | ||
154 | |||
155 | #endregion ISharedRegionModule | ||
156 | |||
157 | #region IInventoryService | ||
158 | |||
159 | public override bool CreateUserInventory(UUID user) | ||
160 | { | ||
161 | return false; | ||
162 | } | ||
163 | |||
164 | public override List<InventoryFolderBase> GetInventorySkeleton(UUID userId) | ||
165 | { | ||
166 | return new List<InventoryFolderBase>(); | ||
167 | } | ||
168 | |||
169 | public override InventoryCollection GetUserInventory(UUID userID) | ||
170 | { | ||
171 | return null; | ||
172 | } | ||
173 | |||
174 | public override void GetUserInventory(UUID userID, InventoryReceiptCallback callback) | ||
175 | { | ||
176 | UUID sessionID = GetSessionID(userID); | ||
177 | try | ||
178 | { | ||
179 | m_RemoteConnector.GetUserInventory(userID.ToString(), sessionID, callback); | ||
180 | } | ||
181 | catch (Exception e) | ||
182 | { | ||
183 | if (StatsManager.SimExtraStats != null) | ||
184 | StatsManager.SimExtraStats.AddInventoryServiceRetrievalFailure(); | ||
185 | |||
186 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: Request inventory operation failed, {0} {1}", | ||
187 | e.Source, e.Message); | ||
188 | } | ||
189 | |||
190 | } | ||
191 | |||
192 | // inherited. See base class | ||
193 | // public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) | ||
194 | |||
195 | public override Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(UUID userID) | ||
196 | { | ||
197 | UUID sessionID = GetSessionID(userID); | ||
198 | return m_RemoteConnector.GetSystemFolders(userID.ToString(), sessionID); | ||
199 | } | ||
200 | |||
201 | public override InventoryCollection GetFolderContent(UUID userID, UUID folderID) | ||
202 | { | ||
203 | UUID sessionID = GetSessionID(userID); | ||
204 | try | ||
205 | { | ||
206 | InventoryCollection invCol = m_RemoteConnector.GetFolderContent(userID.ToString(), folderID, sessionID); | ||
207 | foreach (InventoryItemBase item in invCol.Items) | ||
208 | UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); | ||
209 | return invCol; | ||
210 | } | ||
211 | catch (Exception e) | ||
212 | { | ||
213 | m_log.ErrorFormat("[INVENTORY CONNECTOR]: GetFolderContent operation failed, {0} {1}", | ||
214 | e.Source, e.Message); | ||
215 | } | ||
216 | InventoryCollection nullCollection = new InventoryCollection(); | ||
217 | nullCollection.Folders = new List<InventoryFolderBase>(); | ||
218 | nullCollection.Items = new List<InventoryItemBase>(); | ||
219 | nullCollection.UserID = userID; | ||
220 | return nullCollection; | ||
221 | } | ||
222 | |||
223 | public override List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) | ||
224 | { | ||
225 | UUID sessionID = GetSessionID(userID); | ||
226 | return m_RemoteConnector.GetFolderItems(userID.ToString(), folderID, sessionID); | ||
227 | } | ||
228 | |||
229 | public override bool AddFolder(InventoryFolderBase folder) | ||
230 | { | ||
231 | if (folder == null) | ||
232 | return false; | ||
233 | |||
234 | UUID sessionID = GetSessionID(folder.Owner); | ||
235 | return m_RemoteConnector.AddFolder(folder.Owner.ToString(), folder, sessionID); | ||
236 | } | ||
237 | |||
238 | public override bool UpdateFolder(InventoryFolderBase folder) | ||
239 | { | ||
240 | if (folder == null) | ||
241 | return false; | ||
242 | |||
243 | UUID sessionID = GetSessionID(folder.Owner); | ||
244 | return m_RemoteConnector.UpdateFolder(folder.Owner.ToString(), folder, sessionID); | ||
245 | } | ||
246 | |||
247 | public override bool MoveFolder(InventoryFolderBase folder) | ||
248 | { | ||
249 | if (folder == null) | ||
250 | return false; | ||
251 | |||
252 | UUID sessionID = GetSessionID(folder.Owner); | ||
253 | return m_RemoteConnector.MoveFolder(folder.Owner.ToString(), folder, sessionID); | ||
254 | } | ||
255 | |||
256 | public override bool DeleteFolders(UUID ownerID, List<UUID> folderIDs) | ||
257 | { | ||
258 | if (folderIDs == null) | ||
259 | return false; | ||
260 | if (folderIDs.Count == 0) | ||
261 | return false; | ||
262 | |||
263 | UUID sessionID = GetSessionID(ownerID); | ||
264 | return m_RemoteConnector.DeleteFolders(ownerID.ToString(), folderIDs, sessionID); | ||
265 | } | ||
266 | |||
267 | |||
268 | public override bool PurgeFolder(InventoryFolderBase folder) | ||
269 | { | ||
270 | if (folder == null) | ||
271 | return false; | ||
272 | |||
273 | UUID sessionID = GetSessionID(folder.Owner); | ||
274 | return m_RemoteConnector.PurgeFolder(folder.Owner.ToString(), folder, sessionID); | ||
275 | } | ||
276 | |||
277 | // public bool AddItem(InventoryItemBase item) inherited | ||
278 | // Uses AddItemPlain | ||
279 | |||
280 | protected override bool AddItemPlain(InventoryItemBase item) | ||
281 | { | ||
282 | if (item == null) | ||
283 | return false; | ||
284 | |||
285 | UUID sessionID = GetSessionID(item.Owner); | ||
286 | return m_RemoteConnector.AddItem(item.Owner.ToString(), item, sessionID); | ||
287 | } | ||
288 | |||
289 | public override bool UpdateItem(InventoryItemBase item) | ||
290 | { | ||
291 | if (item == null) | ||
292 | return false; | ||
293 | |||
294 | UUID sessionID = GetSessionID(item.Owner); | ||
295 | return m_RemoteConnector.UpdateItem(item.Owner.ToString(), item, sessionID); | ||
296 | } | ||
297 | |||
298 | public override bool MoveItems(UUID ownerID, List<InventoryItemBase> items) | ||
299 | { | ||
300 | if (items == null) | ||
301 | return false; | ||
302 | |||
303 | UUID sessionID = GetSessionID(ownerID); | ||
304 | return m_RemoteConnector.MoveItems(ownerID.ToString(), items, sessionID); | ||
305 | } | ||
306 | |||
307 | |||
308 | public override bool DeleteItems(UUID ownerID, List<UUID> itemIDs) | ||
309 | { | ||
310 | if (itemIDs == null) | ||
311 | return false; | ||
312 | if (itemIDs.Count == 0) | ||
313 | return true; | ||
314 | |||
315 | UUID sessionID = GetSessionID(ownerID); | ||
316 | return m_RemoteConnector.DeleteItems(ownerID.ToString(), itemIDs, sessionID); | ||
317 | } | ||
318 | |||
319 | public override InventoryItemBase GetItem(InventoryItemBase item) | ||
320 | { | ||
321 | if (item == null) | ||
322 | return null; | ||
323 | |||
324 | UUID sessionID = GetSessionID(item.Owner); | ||
325 | return m_RemoteConnector.QueryItem(item.Owner.ToString(), item, sessionID); | ||
326 | } | ||
327 | |||
328 | public override InventoryFolderBase GetFolder(InventoryFolderBase folder) | ||
329 | { | ||
330 | if (folder == null) | ||
331 | return null; | ||
332 | |||
333 | UUID sessionID = GetSessionID(folder.Owner); | ||
334 | return m_RemoteConnector.QueryFolder(folder.Owner.ToString(), folder, sessionID); | ||
335 | } | ||
336 | |||
337 | public override bool HasInventoryForUser(UUID userID) | ||
338 | { | ||
339 | return false; | ||
340 | } | ||
341 | |||
342 | public override List<InventoryItemBase> GetActiveGestures(UUID userId) | ||
343 | { | ||
344 | return new List<InventoryItemBase>(); | ||
345 | } | ||
346 | |||
347 | public override int GetAssetPermissions(UUID userID, UUID assetID) | ||
348 | { | ||
349 | UUID sessionID = GetSessionID(userID); | ||
350 | return m_RemoteConnector.GetAssetPermissions(userID.ToString(), assetID, sessionID); | ||
351 | } | ||
352 | |||
353 | |||
354 | #endregion | ||
355 | |||
356 | private UUID GetSessionID(UUID userID) | ||
357 | { | ||
358 | return UUID.Zero; | ||
359 | } | ||
360 | |||
361 | } | ||
362 | } | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs index c5972dd..56720b7 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs | |||
@@ -225,17 +225,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation | |||
225 | if (destination == null) | 225 | if (destination == null) |
226 | return false; | 226 | return false; |
227 | 227 | ||
228 | // We limit the number of messages sent for a position change to just one per | ||
229 | // simulator so when we receive the update we need to hand it to each of the | ||
230 | // scenes; scenes each check to see if the is a scene presence for the avatar | ||
231 | // note that we really don't need the GridRegion for this call | ||
228 | foreach (Scene s in m_sceneList) | 232 | foreach (Scene s in m_sceneList) |
229 | { | 233 | { |
230 | if (s.RegionInfo.RegionHandle == destination.RegionHandle) | 234 | //m_log.Debug("[LOCAL COMMS]: Found region to send ChildAgentUpdate"); |
231 | { | 235 | s.IncomingChildAgentDataUpdate(cAgentData); |
232 | //m_log.Debug("[LOCAL COMMS]: Found region to send ChildAgentUpdate"); | ||
233 | s.IncomingChildAgentDataUpdate(cAgentData); | ||
234 | return true; | ||
235 | } | ||
236 | } | 236 | } |
237 | //m_log.Debug("[LOCAL COMMS]: region not found for ChildAgentUpdate"); | 237 | //m_log.Debug("[LOCAL COMMS]: region not found for ChildAgentUpdate"); |
238 | return false; | 238 | return true; |
239 | } | 239 | } |
240 | 240 | ||
241 | public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent) | 241 | public bool RetrieveAgent(GridRegion destination, UUID id, out IAgentData agent) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index f8ff308..837e655 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs | |||
@@ -193,7 +193,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
193 | } | 193 | } |
194 | } | 194 | } |
195 | 195 | ||
196 | public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, UUID scopeID, ulong regionHandle); | 196 | public delegate void SendChildAgentDataUpdateDelegate(AgentPosition cAgentData, UUID scopeID, GridRegion dest); |
197 | |||
197 | 198 | ||
198 | /// <summary> | 199 | /// <summary> |
199 | /// This informs all neighboring regions about the settings of it's child agent. | 200 | /// This informs all neighboring regions about the settings of it's child agent. |
@@ -202,31 +203,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
202 | /// This contains information, such as, Draw Distance, Camera location, Current Position, Current throttle settings, etc. | 203 | /// This contains information, such as, Draw Distance, Camera location, Current Position, Current throttle settings, etc. |
203 | /// | 204 | /// |
204 | /// </summary> | 205 | /// </summary> |
205 | private void SendChildAgentDataUpdateAsync(AgentPosition cAgentData, UUID scopeID, ulong regionHandle) | 206 | private void SendChildAgentDataUpdateAsync(AgentPosition cAgentData, UUID scopeID, GridRegion dest) |
206 | { | 207 | { |
207 | //m_log.Info("[INTERGRID]: Informing neighbors about my agent in " + m_regionInfo.RegionName); | 208 | //m_log.Info("[INTERGRID]: Informing neighbors about my agent in " + m_regionInfo.RegionName); |
208 | try | 209 | try |
209 | { | 210 | { |
210 | //m_commsProvider.InterRegion.ChildAgentUpdate(regionHandle, cAgentData); | 211 | m_scene.SimulationService.UpdateAgent(dest, cAgentData); |
211 | uint x = 0, y = 0; | ||
212 | Utils.LongToUInts(regionHandle, out x, out y); | ||
213 | GridRegion destination = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); | ||
214 | m_scene.SimulationService.UpdateAgent(destination, cAgentData); | ||
215 | } | 212 | } |
216 | catch | 213 | catch |
217 | { | 214 | { |
218 | // Ignore; we did our best | 215 | // Ignore; we did our best |
219 | } | 216 | } |
220 | |||
221 | //if (regionAccepted) | ||
222 | //{ | ||
223 | // //m_log.Info("[INTERGRID]: Completed sending a neighbor an update about my agent"); | ||
224 | //} | ||
225 | //else | ||
226 | //{ | ||
227 | // //m_log.Info("[INTERGRID]: Failed sending a neighbor an update about my agent"); | ||
228 | //} | ||
229 | |||
230 | } | 217 | } |
231 | 218 | ||
232 | private void SendChildAgentDataUpdateCompleted(IAsyncResult iar) | 219 | private void SendChildAgentDataUpdateCompleted(IAsyncResult iar) |
@@ -240,14 +227,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
240 | // This assumes that we know what our neighbors are. | 227 | // This assumes that we know what our neighbors are. |
241 | try | 228 | try |
242 | { | 229 | { |
230 | uint x = 0, y = 0; | ||
231 | List<string> simulatorList = new List<string>(); | ||
243 | foreach (ulong regionHandle in presence.KnownChildRegionHandles) | 232 | foreach (ulong regionHandle in presence.KnownChildRegionHandles) |
244 | { | 233 | { |
245 | if (regionHandle != m_regionInfo.RegionHandle) | 234 | if (regionHandle != m_regionInfo.RegionHandle) |
246 | { | 235 | { |
247 | SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync; | 236 | // we only want to send one update to each simulator; the simulator will |
248 | d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, regionHandle, | 237 | // hand it off to the regions where a child agent exists, this does assume |
249 | SendChildAgentDataUpdateCompleted, | 238 | // that the region position is cached or performance will degrade |
250 | d); | 239 | Utils.LongToUInts(regionHandle, out x, out y); |
240 | GridRegion dest = m_scene.GridService.GetRegionByPosition(UUID.Zero, (int)x, (int)y); | ||
241 | if (! simulatorList.Contains(dest.ServerURI)) | ||
242 | { | ||
243 | // we havent seen this simulator before, add it to the list | ||
244 | // and send it an update | ||
245 | simulatorList.Add(dest.ServerURI); | ||
246 | |||
247 | SendChildAgentDataUpdateDelegate d = SendChildAgentDataUpdateAsync; | ||
248 | d.BeginInvoke(cAgentData, m_regionInfo.ScopeID, dest, | ||
249 | SendChildAgentDataUpdateCompleted, | ||
250 | d); | ||
251 | } | ||
251 | } | 252 | } |
252 | } | 253 | } |
253 | } | 254 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 4fcd8f5..6a92378 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2055,8 +2055,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2055 | 2055 | ||
2056 | public void GetProperties(IClientAPI client) | 2056 | public void GetProperties(IClientAPI client) |
2057 | { | 2057 | { |
2058 | //Viewer wants date in microseconds so multiply it by 1,000,000. | ||
2058 | client.SendObjectPropertiesReply( | 2059 | client.SendObjectPropertiesReply( |
2059 | m_fromUserInventoryItemID, (ulong)_creationDate, _creatorID, UUID.Zero, UUID.Zero, | 2060 | m_fromUserInventoryItemID, (ulong)_creationDate*(ulong)1e6, _creatorID, UUID.Zero, UUID.Zero, |
2060 | _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID, | 2061 | _groupID, (short)InventorySerial, _lastOwnerID, UUID, _ownerID, |
2061 | ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description, | 2062 | ParentGroup.RootPart.TouchName, new byte[0], ParentGroup.RootPart.SitName, Name, Description, |
2062 | ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask, | 2063 | ParentGroup.RootPart._ownerMask, ParentGroup.RootPart._nextOwnerMask, ParentGroup.RootPart._groupMask, ParentGroup.RootPart._everyoneMask, |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 30fb252..72ee495 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1748,15 +1748,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1748 | 1748 | ||
1749 | protected void SetTexture(SceneObjectPart part, string texture, int face) | 1749 | protected void SetTexture(SceneObjectPart part, string texture, int face) |
1750 | { | 1750 | { |
1751 | UUID textureID=new UUID(); | 1751 | UUID textureID = new UUID(); |
1752 | 1752 | ||
1753 | if (!UUID.TryParse(texture, out textureID)) | 1753 | textureID = InventoryKey(texture, (int)AssetType.Texture); |
1754 | { | 1754 | if (textureID == UUID.Zero) |
1755 | textureID=InventoryKey(texture, (int)AssetType.Texture); | 1755 | { |
1756 | } | 1756 | if (!UUID.TryParse(texture, out textureID)) |
1757 | 1757 | return; | |
1758 | if (textureID == UUID.Zero) | 1758 | } |
1759 | return; | ||
1760 | 1759 | ||
1761 | Primitive.TextureEntry tex = part.Shape.Textures; | 1760 | Primitive.TextureEntry tex = part.Shape.Textures; |
1762 | 1761 | ||
@@ -3062,14 +3061,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3062 | msg.fromGroup = false;// fromGroup; | 3061 | msg.fromGroup = false;// fromGroup; |
3063 | msg.offline = (byte)0; //offline; | 3062 | msg.offline = (byte)0; //offline; |
3064 | msg.ParentEstateID = 0; //ParentEstateID; | 3063 | msg.ParentEstateID = 0; //ParentEstateID; |
3065 | msg.Position = Vector3.Zero;// new Vector3(m_host.AbsolutePosition); | 3064 | msg.Position = new Vector3(m_host.AbsolutePosition); |
3066 | msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid; | 3065 | msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid; |
3067 | msg.binaryBucket = new byte[0];// binaryBucket; | 3066 | msg.binaryBucket |
3067 | = Util.StringToBytes256( | ||
3068 | "{0}/{1}/{2}/{3}", | ||
3069 | World.RegionInfo.RegionName, | ||
3070 | (int)Math.Floor(m_host.AbsolutePosition.X), | ||
3071 | (int)Math.Floor(m_host.AbsolutePosition.Y), | ||
3072 | (int)Math.Floor(m_host.AbsolutePosition.Z)); | ||
3068 | 3073 | ||
3069 | if (m_TransferModule != null) | 3074 | if (m_TransferModule != null) |
3070 | { | 3075 | { |
3071 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); | 3076 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); |
3072 | } | 3077 | } |
3078 | |||
3073 | ScriptSleep(2000); | 3079 | ScriptSleep(2000); |
3074 | } | 3080 | } |
3075 | 3081 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index c0c790d..3f8735e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -702,7 +702,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
702 | // and convert the regionName to the target region | 702 | // and convert the regionName to the target region |
703 | if (regionName.Contains(".") && regionName.Contains(":")) | 703 | if (regionName.Contains(".") && regionName.Contains(":")) |
704 | { | 704 | { |
705 | // List<GridRegion> regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1); | 705 | World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1); |
706 | // List<GridRegion> regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1); | ||
707 | |||
706 | string[] parts = regionName.Split(new char[] { ':' }); | 708 | string[] parts = regionName.Split(new char[] { ':' }); |
707 | if (parts.Length > 2) | 709 | if (parts.Length > 2) |
708 | regionName = parts[0] + ':' + parts[1] + "/ " + parts[2]; | 710 | regionName = parts[0] + ':' + parts[1] + "/ " + parts[2]; |