diff options
author | Melanie | 2012-05-27 19:24:30 +0100 |
---|---|---|
committer | Melanie | 2012-05-27 19:24:30 +0100 |
commit | 884c0e7bb10bd2c2a951901c6f1dd56a86ef6b9f (patch) | |
tree | dd692a54213f86fd64bd29c6662584df85088193 /OpenSim/Services | |
parent | Merge branch 'master' into careminster (diff) | |
parent | minor: code formatting from 0b72f773 (diff) | |
download | opensim-SC_OLD-884c0e7bb10bd2c2a951901c6f1dd56a86ef6b9f.zip opensim-SC_OLD-884c0e7bb10bd2c2a951901c6f1dd56a86ef6b9f.tar.gz opensim-SC_OLD-884c0e7bb10bd2c2a951901c6f1dd56a86ef6b9f.tar.bz2 opensim-SC_OLD-884c0e7bb10bd2c2a951901c6f1dd56a86ef6b9f.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Data/MySQL/MySQLSimulationData.cs
OpenSim/Data/MySQL/Resources/RegionStore.migrations
OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
OpenSim/Region/Framework/Scenes/Scene.cs
OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
Diffstat (limited to 'OpenSim/Services')
5 files changed, 78 insertions, 30 deletions
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs index ccef50b..c9cbbfa 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs | |||
@@ -148,5 +148,21 @@ namespace OpenSim.Services.Connectors | |||
148 | { | 148 | { |
149 | m_database.RemoveRegionWindlightSettings(regionID); | 149 | m_database.RemoveRegionWindlightSettings(regionID); |
150 | } | 150 | } |
151 | |||
152 | public string LoadRegionEnvironmentSettings(UUID regionUUID) | ||
153 | { | ||
154 | return m_database.LoadRegionEnvironmentSettings(regionUUID); | ||
155 | } | ||
156 | |||
157 | public void StoreRegionEnvironmentSettings(UUID regionUUID, string settings) | ||
158 | { | ||
159 | m_database.StoreRegionEnvironmentSettings(regionUUID, settings); | ||
160 | } | ||
161 | |||
162 | public void RemoveRegionEnvironmentSettings(UUID regionUUID) | ||
163 | { | ||
164 | m_database.RemoveRegionEnvironmentSettings(regionUUID); | ||
165 | } | ||
166 | |||
151 | } | 167 | } |
152 | } | 168 | } |
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 5037543..cd93386 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs | |||
@@ -62,7 +62,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
62 | //m_Region = region; | 62 | //m_Region = region; |
63 | } | 63 | } |
64 | 64 | ||
65 | public IScene GetScene(ulong regionHandle) | 65 | public IScene GetScene(UUID regionId) |
66 | { | 66 | { |
67 | return null; | 67 | return null; |
68 | } | 68 | } |
@@ -320,29 +320,40 @@ namespace OpenSim.Services.Connectors.Simulation | |||
320 | { | 320 | { |
321 | OSDMap data = (OSDMap)result["_Result"]; | 321 | OSDMap data = (OSDMap)result["_Result"]; |
322 | 322 | ||
323 | // FIXME: If there is a _Result map then it's the success key here that indicates the true success | ||
324 | // or failure, not the sibling result node. | ||
325 | success = data["success"]; | ||
326 | |||
323 | reason = data["reason"].AsString(); | 327 | reason = data["reason"].AsString(); |
324 | if (data["version"] != null && data["version"].AsString() != string.Empty) | 328 | if (data["version"] != null && data["version"].AsString() != string.Empty) |
325 | version = data["version"].AsString(); | 329 | version = data["version"].AsString(); |
326 | 330 | ||
327 | m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1} version {2} ({3})", uri, success, version, data["version"].AsString()); | 331 | m_log.DebugFormat( |
332 | "[REMOTE SIMULATION CONNECTOR]: QueryAccess to {0} returned {1}, reason {2}, version {3} ({4})", | ||
333 | uri, success, reason, version, data["version"].AsString()); | ||
328 | } | 334 | } |
329 | 335 | ||
330 | if (!success) | 336 | if (!success) |
331 | { | 337 | { |
332 | if (result.ContainsKey("Message")) | 338 | // If we don't check this then OpenSimulator 0.7.3.1 and some period before will never see the |
339 | // actual failure message | ||
340 | if (!result.ContainsKey("_Result")) | ||
333 | { | 341 | { |
334 | string message = result["Message"].AsString(); | 342 | if (result.ContainsKey("Message")) |
335 | if (message == "Service request failed: [MethodNotAllowed] MethodNotAllowed") // Old style region | ||
336 | { | 343 | { |
337 | m_log.Info("[REMOTE SIMULATION CONNECTOR]: The above web util error was caused by a TP to a sim that doesn't support QUERYACCESS and can be ignored"); | 344 | string message = result["Message"].AsString(); |
338 | return true; | 345 | if (message == "Service request failed: [MethodNotAllowed] MethodNotAllowed") // Old style region |
346 | { | ||
347 | m_log.Info("[REMOTE SIMULATION CONNECTOR]: The above web util error was caused by a TP to a sim that doesn't support QUERYACCESS and can be ignored"); | ||
348 | return true; | ||
349 | } | ||
350 | |||
351 | reason = result["Message"]; | ||
352 | } | ||
353 | else | ||
354 | { | ||
355 | reason = "Communications failure"; | ||
339 | } | 356 | } |
340 | |||
341 | reason = result["Message"]; | ||
342 | } | ||
343 | else | ||
344 | { | ||
345 | reason = "Communications failure"; | ||
346 | } | 357 | } |
347 | 358 | ||
348 | return false; | 359 | return false; |
@@ -356,7 +367,7 @@ namespace OpenSim.Services.Connectors.Simulation | |||
356 | } | 367 | } |
357 | catch (Exception e) | 368 | catch (Exception e) |
358 | { | 369 | { |
359 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] QueryAcess failed with exception; {0}",e.ToString()); | 370 | m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] QueryAcesss failed with exception; {0}",e.ToString()); |
360 | } | 371 | } |
361 | 372 | ||
362 | return false; | 373 | return false; |
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index 3dc87bc..8a60ca5 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs | |||
@@ -509,19 +509,21 @@ namespace OpenSim.Services.GridService | |||
509 | return; | 509 | return; |
510 | } | 510 | } |
511 | 511 | ||
512 | MainConsole.Instance.Output("Region Name Region UUID"); | ||
513 | MainConsole.Instance.Output("Location URI"); | ||
514 | MainConsole.Instance.Output("Owner ID Flags"); | ||
515 | MainConsole.Instance.Output("-------------------------------------------------------------------------------"); | ||
516 | foreach (RegionData r in regions) | 512 | foreach (RegionData r in regions) |
517 | { | 513 | { |
518 | OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]); | 514 | OpenSim.Data.RegionFlags flags = (OpenSim.Data.RegionFlags)Convert.ToInt32(r.Data["flags"]); |
519 | MainConsole.Instance.Output(String.Format("{0,-20} {1}\n{2,-20} {3}\n{4,-39} {5}\n\n", | 515 | |
520 | r.RegionName, r.RegionID, | 516 | ConsoleDisplayList dispList = new ConsoleDisplayList(); |
521 | String.Format("{0},{1}", r.posX / Constants.RegionSize, r.posY / Constants.RegionSize), | 517 | dispList.AddRow("Region Name", r.RegionName); |
522 | r.Data["serverURI"], | 518 | dispList.AddRow("Region ID", r.RegionID); |
523 | r.Data["owner_uuid"], flags)); | 519 | dispList.AddRow("Location", string.Format("{0},{1}", r.coordX, r.coordY)); |
520 | dispList.AddRow("URI", r.Data["serverURI"]); | ||
521 | dispList.AddRow("Owner ID", r.Data["owner_uuid"]); | ||
522 | dispList.AddRow("Flags", flags); | ||
523 | |||
524 | MainConsole.Instance.Output(dispList.ToString()); | ||
524 | } | 525 | } |
526 | |||
525 | return; | 527 | return; |
526 | } | 528 | } |
527 | 529 | ||
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs index 7940256..d9f242b 100644 --- a/OpenSim/Services/Interfaces/ISimulationService.cs +++ b/OpenSim/Services/Interfaces/ISimulationService.cs | |||
@@ -35,7 +35,17 @@ namespace OpenSim.Services.Interfaces | |||
35 | { | 35 | { |
36 | public interface ISimulationService | 36 | public interface ISimulationService |
37 | { | 37 | { |
38 | IScene GetScene(ulong regionHandle); | 38 | /// <summary> |
39 | /// Retrieve the scene with the given region ID. | ||
40 | /// </summary> | ||
41 | /// <param name='regionId'> | ||
42 | /// Region identifier. | ||
43 | /// </param> | ||
44 | /// <returns> | ||
45 | /// The scene. | ||
46 | /// </returns> | ||
47 | IScene GetScene(UUID regionId); | ||
48 | |||
39 | ISimulationService GetInnerService(); | 49 | ISimulationService GetInnerService(); |
40 | 50 | ||
41 | #region Agents | 51 | #region Agents |
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index eed88bd..3355428 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs | |||
@@ -302,7 +302,8 @@ namespace OpenSim.Services.InventoryService | |||
302 | 302 | ||
303 | public virtual bool AddFolder(InventoryFolderBase folder) | 303 | public virtual bool AddFolder(InventoryFolderBase folder) |
304 | { | 304 | { |
305 | //m_log.DebugFormat("[XINVENTORY]: Add folder {0} type {1} in parent {2}", folder.Name, folder.Type, folder.ParentID); | 305 | // m_log.DebugFormat("[XINVENTORY]: Add folder {0} type {1} in parent {2}", folder.Name, folder.Type, folder.ParentID); |
306 | |||
306 | InventoryFolderBase check = GetFolder(folder); | 307 | InventoryFolderBase check = GetFolder(folder); |
307 | if (check != null) | 308 | if (check != null) |
308 | return false; | 309 | return false; |
@@ -327,27 +328,36 @@ namespace OpenSim.Services.InventoryService | |||
327 | 328 | ||
328 | public virtual bool UpdateFolder(InventoryFolderBase folder) | 329 | public virtual bool UpdateFolder(InventoryFolderBase folder) |
329 | { | 330 | { |
330 | //m_log.DebugFormat("[XINVENTORY]: Update folder {0} {1} ({2})", folder.Name, folder.Type, folder.ID); | 331 | // m_log.DebugFormat("[XINVENTORY]: Update folder {0} {1} ({2})", folder.Name, folder.Type, folder.ID); |
332 | |||
331 | XInventoryFolder xFolder = ConvertFromOpenSim(folder); | 333 | XInventoryFolder xFolder = ConvertFromOpenSim(folder); |
332 | InventoryFolderBase check = GetFolder(folder); | 334 | InventoryFolderBase check = GetFolder(folder); |
335 | |||
333 | if (check == null) | 336 | if (check == null) |
334 | return AddFolder(folder); | 337 | return AddFolder(folder); |
335 | 338 | ||
336 | if (check.Type != -1 || xFolder.type != -1) | 339 | if ((check.Type != (short)AssetType.Unknown || xFolder.type != (short)AssetType.Unknown) |
340 | && (check.Type != (short)AssetType.OutfitFolder || xFolder.type != (short)AssetType.OutfitFolder)) | ||
337 | { | 341 | { |
338 | if (xFolder.version < check.Version) | 342 | if (xFolder.version < check.Version) |
339 | { | 343 | { |
340 | //m_log.DebugFormat("[XINVENTORY]: {0} < {1} can't do", xFolder.version, check.Version); | 344 | // m_log.DebugFormat("[XINVENTORY]: {0} < {1} can't do", xFolder.version, check.Version); |
341 | return false; | 345 | return false; |
342 | } | 346 | } |
347 | |||
343 | check.Version = (ushort)xFolder.version; | 348 | check.Version = (ushort)xFolder.version; |
344 | xFolder = ConvertFromOpenSim(check); | 349 | xFolder = ConvertFromOpenSim(check); |
345 | //m_log.DebugFormat("[XINVENTORY]: Storing {0} {1} {2}", xFolder.folderName, xFolder.version, xFolder.type); | 350 | |
351 | // m_log.DebugFormat( | ||
352 | // "[XINVENTORY]: Storing version only update to system folder {0} {1} {2}", | ||
353 | // xFolder.folderName, xFolder.version, xFolder.type); | ||
354 | |||
346 | return m_Database.StoreFolder(xFolder); | 355 | return m_Database.StoreFolder(xFolder); |
347 | } | 356 | } |
348 | 357 | ||
349 | if (xFolder.version < check.Version) | 358 | if (xFolder.version < check.Version) |
350 | xFolder.version = check.Version; | 359 | xFolder.version = check.Version; |
360 | |||
351 | xFolder.folderID = check.ID; | 361 | xFolder.folderID = check.ID; |
352 | 362 | ||
353 | return m_Database.StoreFolder(xFolder); | 363 | return m_Database.StoreFolder(xFolder); |
@@ -433,7 +443,6 @@ namespace OpenSim.Services.InventoryService | |||
433 | 443 | ||
434 | public virtual bool UpdateItem(InventoryItemBase item) | 444 | public virtual bool UpdateItem(InventoryItemBase item) |
435 | { | 445 | { |
436 | // throw new Exception("urrgh"); | ||
437 | if (!m_AllowDelete) | 446 | if (!m_AllowDelete) |
438 | if (item.AssetType == (sbyte)AssetType.Link || item.AssetType == (sbyte)AssetType.LinkFolder) | 447 | if (item.AssetType == (sbyte)AssetType.Link || item.AssetType == (sbyte)AssetType.LinkFolder) |
439 | return false; | 448 | return false; |