diff options
31 files changed, 725 insertions, 150 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 95713e9..d52ebda 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -439,7 +439,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
439 | } | 439 | } |
440 | 440 | ||
441 | /// <summary> | 441 | /// <summary> |
442 | /// | 442 | /// Convert raw uploaded data into the appropriate asset and item. |
443 | /// </summary> | 443 | /// </summary> |
444 | /// <param name="assetID"></param> | 444 | /// <param name="assetID"></param> |
445 | /// <param name="inventoryItem"></param> | 445 | /// <param name="inventoryItem"></param> |
@@ -506,8 +506,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
506 | } | 506 | } |
507 | } | 507 | } |
508 | 508 | ||
509 | |||
510 | |||
511 | /// <summary> | 509 | /// <summary> |
512 | /// | 510 | /// |
513 | /// </summary> | 511 | /// </summary> |
@@ -632,7 +630,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
632 | } | 630 | } |
633 | 631 | ||
634 | /// <summary> | 632 | /// <summary> |
635 | /// | 633 | /// Handle raw asset upload data via the capability. |
636 | /// </summary> | 634 | /// </summary> |
637 | /// <param name="data"></param> | 635 | /// <param name="data"></param> |
638 | /// <param name="path"></param> | 636 | /// <param name="path"></param> |
@@ -670,6 +668,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
670 | 668 | ||
671 | return res; | 669 | return res; |
672 | } | 670 | } |
671 | |||
673 | ///Left this in and commented in case there are unforseen issues | 672 | ///Left this in and commented in case there are unforseen issues |
674 | //private void SaveAssetToFile(string filename, byte[] data) | 673 | //private void SaveAssetToFile(string filename, byte[] data) |
675 | //{ | 674 | //{ |
@@ -679,6 +678,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
679 | // bw.Close(); | 678 | // bw.Close(); |
680 | // fs.Close(); | 679 | // fs.Close(); |
681 | //} | 680 | //} |
681 | |||
682 | private static void SaveAssetToFile(string filename, byte[] data) | 682 | private static void SaveAssetToFile(string filename, byte[] data) |
683 | { | 683 | { |
684 | string assetPath = "UserAssets"; | 684 | string assetPath = "UserAssets"; |
@@ -719,7 +719,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
719 | } | 719 | } |
720 | 720 | ||
721 | /// <summary> | 721 | /// <summary> |
722 | /// | 722 | /// Handle raw uploaded asset data. |
723 | /// </summary> | 723 | /// </summary> |
724 | /// <param name="data"></param> | 724 | /// <param name="data"></param> |
725 | /// <param name="path"></param> | 725 | /// <param name="path"></param> |
@@ -752,6 +752,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
752 | 752 | ||
753 | return res; | 753 | return res; |
754 | } | 754 | } |
755 | |||
755 | ///Left this in and commented in case there are unforseen issues | 756 | ///Left this in and commented in case there are unforseen issues |
756 | //private void SaveAssetToFile(string filename, byte[] data) | 757 | //private void SaveAssetToFile(string filename, byte[] data) |
757 | //{ | 758 | //{ |
@@ -761,6 +762,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
761 | // bw.Close(); | 762 | // bw.Close(); |
762 | // fs.Close(); | 763 | // fs.Close(); |
763 | //} | 764 | //} |
765 | |||
764 | private static void SaveAssetToFile(string filename, byte[] data) | 766 | private static void SaveAssetToFile(string filename, byte[] data) |
765 | { | 767 | { |
766 | string assetPath = "UserAssets"; | 768 | string assetPath = "UserAssets"; |
@@ -905,7 +907,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
905 | } | 907 | } |
906 | 908 | ||
907 | /// <summary> | 909 | /// <summary> |
908 | /// | 910 | /// Handle raw uploaded baked texture data. |
909 | /// </summary> | 911 | /// </summary> |
910 | /// <param name="data"></param> | 912 | /// <param name="data"></param> |
911 | /// <param name="path"></param> | 913 | /// <param name="path"></param> |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs new file mode 100644 index 0000000..9f78948 --- /dev/null +++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs | |||
@@ -0,0 +1,152 @@ | |||
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 System; | ||
29 | using System.Collections; | ||
30 | using System.Reflection; | ||
31 | using log4net; | ||
32 | using Nini.Config; | ||
33 | using Mono.Addins; | ||
34 | using OpenMetaverse; | ||
35 | using OpenMetaverse.StructuredData; | ||
36 | using OpenSim.Framework; | ||
37 | using OpenSim.Framework.Servers.HttpServer; | ||
38 | using OpenSim.Region.Framework.Interfaces; | ||
39 | using OpenSim.Region.Framework.Scenes; | ||
40 | using OpenSim.Services.Interfaces; | ||
41 | using Caps = OpenSim.Framework.Capabilities.Caps; | ||
42 | |||
43 | namespace OpenSim.Region.ClientStack.Linden | ||
44 | { | ||
45 | /// <summary> | ||
46 | /// SimulatorFeatures capability. This is required for uploading Mesh. | ||
47 | /// Since is accepts an open-ended response, we also send more information | ||
48 | /// for viewers that care to interpret it. | ||
49 | /// | ||
50 | /// NOTE: Part of this code was adapted from the Aurora project, specifically | ||
51 | /// the normal part of the response in the capability handler. | ||
52 | /// </summary> | ||
53 | /// | ||
54 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | ||
55 | public class SimulatorFeaturesModule : ISharedRegionModule | ||
56 | { | ||
57 | private static readonly ILog m_log = | ||
58 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
59 | private Scene m_scene; | ||
60 | |||
61 | private string m_MapImageServerURL = string.Empty; | ||
62 | private string m_SearchURL = string.Empty; | ||
63 | |||
64 | #region ISharedRegionModule Members | ||
65 | |||
66 | public void Initialise(IConfigSource source) | ||
67 | { | ||
68 | IConfig config = source.Configs["SimulatorFeatures"]; | ||
69 | if (config == null) | ||
70 | return; | ||
71 | |||
72 | m_MapImageServerURL = config.GetString("MapImageServerURI", string.Empty); | ||
73 | if (m_MapImageServerURL != string.Empty) | ||
74 | { | ||
75 | m_MapImageServerURL = m_MapImageServerURL.Trim(); | ||
76 | if (!m_MapImageServerURL.EndsWith("/")) | ||
77 | m_MapImageServerURL = m_MapImageServerURL + "/"; | ||
78 | } | ||
79 | |||
80 | m_SearchURL = config.GetString("SearchServerURI", string.Empty); | ||
81 | } | ||
82 | |||
83 | public void AddRegion(Scene s) | ||
84 | { | ||
85 | m_scene = s; | ||
86 | m_scene.EventManager.OnRegisterCaps += RegisterCaps; | ||
87 | } | ||
88 | |||
89 | public void RemoveRegion(Scene s) | ||
90 | { | ||
91 | m_scene.EventManager.OnRegisterCaps -= RegisterCaps; | ||
92 | } | ||
93 | |||
94 | public void RegionLoaded(Scene s) | ||
95 | { | ||
96 | } | ||
97 | |||
98 | public void PostInitialise() | ||
99 | { | ||
100 | } | ||
101 | |||
102 | public void Close() { } | ||
103 | |||
104 | public string Name { get { return "SimulatorFeaturesModule"; } } | ||
105 | |||
106 | public Type ReplaceableInterface | ||
107 | { | ||
108 | get { return null; } | ||
109 | } | ||
110 | |||
111 | #endregion | ||
112 | |||
113 | public void RegisterCaps(UUID agentID, Caps caps) | ||
114 | { | ||
115 | IRequestHandler reqHandler = new RestHTTPHandler("GET", "/CAPS/" + UUID.Random(), SimulatorFeatures); | ||
116 | caps.RegisterHandler("SimulatorFeatures", reqHandler); | ||
117 | } | ||
118 | |||
119 | private Hashtable SimulatorFeatures(Hashtable mDhttpMethod) | ||
120 | { | ||
121 | m_log.DebugFormat("[SIMULATOR FEATURES MODULE]: SimulatorFeatures request"); | ||
122 | OSDMap data = new OSDMap(); | ||
123 | data["MeshRezEnabled"] = true; | ||
124 | data["MeshUploadEnabled"] = true; | ||
125 | data["MeshXferEnabled"] = true; | ||
126 | data["PhysicsMaterialsEnabled"] = true; | ||
127 | |||
128 | OSDMap typesMap = new OSDMap(); | ||
129 | typesMap["convex"] = true; | ||
130 | typesMap["none"] = true; | ||
131 | typesMap["prim"] = true; | ||
132 | data["PhysicsShapeTypes"] = typesMap; | ||
133 | |||
134 | // Extra information for viewers that want to use it | ||
135 | OSDMap gridServicesMap = new OSDMap(); | ||
136 | if (m_MapImageServerURL != string.Empty) | ||
137 | gridServicesMap["map-server-url"] = m_MapImageServerURL; | ||
138 | if (m_SearchURL != string.Empty) | ||
139 | gridServicesMap["search"] = m_SearchURL; | ||
140 | data["GridServices"] = gridServicesMap; | ||
141 | |||
142 | //Send back data | ||
143 | Hashtable responsedata = new Hashtable(); | ||
144 | responsedata["int_response_code"] = 200; | ||
145 | responsedata["content_type"] = "text/plain"; | ||
146 | responsedata["keepalive"] = false; | ||
147 | responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(data); | ||
148 | return responsedata; | ||
149 | } | ||
150 | |||
151 | } | ||
152 | } | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index c2ad079..36ecb3b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | |||
@@ -147,7 +147,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver | |||
147 | protected void SaveInvItem(InventoryItemBase inventoryItem, string path, Dictionary<string, object> options, IUserAccountService userAccountService) | 147 | protected void SaveInvItem(InventoryItemBase inventoryItem, string path, Dictionary<string, object> options, IUserAccountService userAccountService) |
148 | { | 148 | { |
149 | if (options.ContainsKey("verbose")) | 149 | if (options.ContainsKey("verbose")) |
150 | m_log.InfoFormat("[INVENTORY ARCHIVER]: Saving item {0} with asset {1}", inventoryItem.ID, inventoryItem.AssetID); | 150 | m_log.InfoFormat( |
151 | "[INVENTORY ARCHIVER]: Saving item {0} {1} with asset {2}", | ||
152 | inventoryItem.ID, inventoryItem.Name, inventoryItem.AssetID); | ||
151 | 153 | ||
152 | string filename = path + CreateArchiveItemName(inventoryItem); | 154 | string filename = path + CreateArchiveItemName(inventoryItem); |
153 | 155 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 1341533..d54216a 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -50,6 +50,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
50 | { | 50 | { |
51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
52 | 52 | ||
53 | /// <summary> | ||
54 | /// The maximum distance, in standard region units (256m) that an agent is allowed to transfer. | ||
55 | /// </summary> | ||
56 | public int MaxTransferDistance { get; set; } | ||
57 | |||
53 | protected bool m_Enabled = false; | 58 | protected bool m_Enabled = false; |
54 | protected Scene m_aScene; | 59 | protected Scene m_aScene; |
55 | protected List<Scene> m_Scenes = new List<Scene>(); | 60 | protected List<Scene> m_Scenes = new List<Scene>(); |
@@ -78,13 +83,26 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
78 | string name = moduleConfig.GetString("EntityTransferModule", ""); | 83 | string name = moduleConfig.GetString("EntityTransferModule", ""); |
79 | if (name == Name) | 84 | if (name == Name) |
80 | { | 85 | { |
81 | m_agentsInTransit = new List<UUID>(); | 86 | InitialiseCommon(source); |
82 | m_Enabled = true; | 87 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: {0} enabled.", Name); |
83 | m_log.InfoFormat("[ENTITY TRANSFER MODULE]: {0} enabled.", Name); | ||
84 | } | 88 | } |
85 | } | 89 | } |
86 | } | 90 | } |
87 | 91 | ||
92 | /// <summary> | ||
93 | /// Initialize config common for this module and any descendents. | ||
94 | /// </summary> | ||
95 | /// <param name="source"></param> | ||
96 | protected virtual void InitialiseCommon(IConfigSource source) | ||
97 | { | ||
98 | IConfig transferConfig = source.Configs["EntityTransfer"]; | ||
99 | if (transferConfig != null) | ||
100 | MaxTransferDistance = transferConfig.GetInt("max_distance", 4095); | ||
101 | |||
102 | m_agentsInTransit = new List<UUID>(); | ||
103 | m_Enabled = true; | ||
104 | } | ||
105 | |||
88 | public virtual void PostInitialise() | 106 | public virtual void PostInitialise() |
89 | { | 107 | { |
90 | } | 108 | } |
@@ -114,7 +132,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
114 | return; | 132 | return; |
115 | } | 133 | } |
116 | 134 | ||
117 | |||
118 | public virtual void RemoveRegion(Scene scene) | 135 | public virtual void RemoveRegion(Scene scene) |
119 | { | 136 | { |
120 | if (!m_Enabled) | 137 | if (!m_Enabled) |
@@ -129,7 +146,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
129 | { | 146 | { |
130 | if (!m_Enabled) | 147 | if (!m_Enabled) |
131 | return; | 148 | return; |
132 | |||
133 | } | 149 | } |
134 | 150 | ||
135 | #endregion | 151 | #endregion |
@@ -204,8 +220,18 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
204 | sp.ControllingClient.SendTeleportFailed("Problem at destination"); | 220 | sp.ControllingClient.SendTeleportFailed("Problem at destination"); |
205 | return; | 221 | return; |
206 | } | 222 | } |
207 | m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final destination is x={0} y={1} {2}@{3}", | 223 | |
208 | finalDestination.RegionLocX / Constants.RegionSize, finalDestination.RegionLocY / Constants.RegionSize, finalDestination.RegionID, finalDestination.ServerURI); | 224 | uint curX = 0, curY = 0; |
225 | Utils.LongToUInts(sp.Scene.RegionInfo.RegionHandle, out curX, out curY); | ||
226 | int curCellX = (int)(curX / Constants.RegionSize); | ||
227 | int curCellY = (int)(curY / Constants.RegionSize); | ||
228 | int destCellX = (int)(finalDestination.RegionLocX / Constants.RegionSize); | ||
229 | int destCellY = (int)(finalDestination.RegionLocY / Constants.RegionSize); | ||
230 | |||
231 | // m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Source co-ords are x={0} y={1}", curRegionX, curRegionY); | ||
232 | // | ||
233 | // m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final dest is x={0} y={1} {2}@{3}", | ||
234 | // destRegionX, destRegionY, finalDestination.RegionID, finalDestination.ServerURI); | ||
209 | 235 | ||
210 | // Check that these are not the same coordinates | 236 | // Check that these are not the same coordinates |
211 | if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX && | 237 | if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX && |
@@ -216,6 +242,18 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
216 | return; | 242 | return; |
217 | } | 243 | } |
218 | 244 | ||
245 | if (Math.Abs(curCellX - destCellX) > MaxTransferDistance || Math.Abs(curCellY - destCellY) > MaxTransferDistance) | ||
246 | { | ||
247 | sp.ControllingClient.SendTeleportFailed( | ||
248 | string.Format( | ||
249 | "Can't teleport to {0} ({1},{2}) from {3} ({4},{5}), destination is more than {6} regions way", | ||
250 | finalDestination.RegionName, destCellX, destCellY, | ||
251 | sp.Scene.RegionInfo.RegionName, curCellX, curCellY, | ||
252 | MaxTransferDistance)); | ||
253 | |||
254 | return; | ||
255 | } | ||
256 | |||
219 | // | 257 | // |
220 | // This is it | 258 | // This is it |
221 | // | 259 | // |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index 4d77ef4..a87279a 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -67,10 +67,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
67 | string name = moduleConfig.GetString("EntityTransferModule", ""); | 67 | string name = moduleConfig.GetString("EntityTransferModule", ""); |
68 | if (name == Name) | 68 | if (name == Name) |
69 | { | 69 | { |
70 | m_agentsInTransit = new List<UUID>(); | 70 | InitialiseCommon(source); |
71 | 71 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); | |
72 | m_Enabled = true; | ||
73 | m_log.InfoFormat("[HG ENTITY TRANSFER MODULE]: {0} enabled.", Name); | ||
74 | } | 72 | } |
75 | } | 73 | } |
76 | } | 74 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs new file mode 100644 index 0000000..786e0b5 --- /dev/null +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs | |||
@@ -0,0 +1,137 @@ | |||
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 | using System; | ||
28 | using System.Reflection; | ||
29 | using System.Collections.Generic; | ||
30 | using OpenSim.Framework; | ||
31 | using OpenSim.Services.Interfaces; | ||
32 | using OpenMetaverse; | ||
33 | using log4net; | ||
34 | using GridRegion = OpenSim.Services.Interfaces.GridRegion; | ||
35 | |||
36 | namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | ||
37 | { | ||
38 | public class RegionInfoCache | ||
39 | { | ||
40 | private const double CACHE_EXPIRATION_SECONDS = 300.0; // 5 minutes | ||
41 | |||
42 | // private static readonly ILog m_log = | ||
43 | // LogManager.GetLogger( | ||
44 | // MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
46 | internal struct ScopedRegionUUID | ||
47 | { | ||
48 | public UUID m_scopeID; | ||
49 | public UUID m_regionID; | ||
50 | public ScopedRegionUUID(UUID scopeID, UUID regionID) | ||
51 | { | ||
52 | m_scopeID = scopeID; | ||
53 | m_regionID = regionID; | ||
54 | } | ||
55 | } | ||
56 | |||
57 | internal struct ScopedRegionName | ||
58 | { | ||
59 | public UUID m_scopeID; | ||
60 | public string m_name; | ||
61 | public ScopedRegionName(UUID scopeID, string name) | ||
62 | { | ||
63 | m_scopeID = scopeID; | ||
64 | m_name = name; | ||
65 | } | ||
66 | } | ||
67 | |||
68 | private ExpiringCache<ScopedRegionUUID, GridRegion> m_UUIDCache; | ||
69 | private ExpiringCache<ScopedRegionName, ScopedRegionUUID> m_NameCache; | ||
70 | |||
71 | public RegionInfoCache() | ||
72 | { | ||
73 | m_UUIDCache = new ExpiringCache<ScopedRegionUUID, GridRegion>(); | ||
74 | m_NameCache = new ExpiringCache<ScopedRegionName, ScopedRegionUUID>(); | ||
75 | } | ||
76 | |||
77 | public void Cache(GridRegion rinfo) | ||
78 | { | ||
79 | if (rinfo != null) | ||
80 | this.Cache(rinfo.ScopeID,rinfo.RegionID,rinfo); | ||
81 | } | ||
82 | |||
83 | public void Cache(UUID scopeID, UUID regionID, GridRegion rinfo) | ||
84 | { | ||
85 | // for now, do not cache negative results; this is because | ||
86 | // we need to figure out how to handle regions coming online | ||
87 | // in a timely way | ||
88 | if (rinfo == null) | ||
89 | return; | ||
90 | |||
91 | ScopedRegionUUID id = new ScopedRegionUUID(scopeID,regionID); | ||
92 | |||
93 | // Cache even null accounts | ||
94 | m_UUIDCache.AddOrUpdate(id, rinfo, CACHE_EXPIRATION_SECONDS); | ||
95 | if (rinfo != null) | ||
96 | { | ||
97 | ScopedRegionName name = new ScopedRegionName(scopeID,rinfo.RegionName); | ||
98 | m_NameCache.AddOrUpdate(name, id, CACHE_EXPIRATION_SECONDS); | ||
99 | } | ||
100 | } | ||
101 | |||
102 | public GridRegion Get(UUID scopeID, UUID regionID, out bool inCache) | ||
103 | { | ||
104 | inCache = false; | ||
105 | |||
106 | GridRegion rinfo = null; | ||
107 | ScopedRegionUUID id = new ScopedRegionUUID(scopeID,regionID); | ||
108 | if (m_UUIDCache.TryGetValue(id, out rinfo)) | ||
109 | { | ||
110 | inCache = true; | ||
111 | return rinfo; | ||
112 | } | ||
113 | |||
114 | return null; | ||
115 | } | ||
116 | |||
117 | public GridRegion Get(UUID scopeID, string name, out bool inCache) | ||
118 | { | ||
119 | inCache = false; | ||
120 | |||
121 | ScopedRegionName sname = new ScopedRegionName(scopeID,name); | ||
122 | |||
123 | ScopedRegionUUID id; | ||
124 | if (m_NameCache.TryGetValue(sname, out id)) | ||
125 | { | ||
126 | GridRegion rinfo = null; | ||
127 | if (m_UUIDCache.TryGetValue(id, out rinfo)) | ||
128 | { | ||
129 | inCache = true; | ||
130 | return rinfo; | ||
131 | } | ||
132 | } | ||
133 | |||
134 | return null; | ||
135 | } | ||
136 | } | ||
137 | } | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs index 33cc838..6f364ae 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs | |||
@@ -53,6 +53,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
53 | private IGridService m_LocalGridService; | 53 | private IGridService m_LocalGridService; |
54 | private IGridService m_RemoteGridService; | 54 | private IGridService m_RemoteGridService; |
55 | 55 | ||
56 | private RegionInfoCache m_RegionInfoCache = new RegionInfoCache(); | ||
57 | |||
56 | public RemoteGridServicesConnector() | 58 | public RemoteGridServicesConnector() |
57 | { | 59 | { |
58 | } | 60 | } |
@@ -169,10 +171,16 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
169 | 171 | ||
170 | public GridRegion GetRegionByUUID(UUID scopeID, UUID regionID) | 172 | public GridRegion GetRegionByUUID(UUID scopeID, UUID regionID) |
171 | { | 173 | { |
172 | GridRegion rinfo = m_LocalGridService.GetRegionByUUID(scopeID, regionID); | 174 | bool inCache = false; |
175 | GridRegion rinfo = m_RegionInfoCache.Get(scopeID,regionID,out inCache); | ||
176 | if (inCache) | ||
177 | return rinfo; | ||
178 | |||
179 | rinfo = m_LocalGridService.GetRegionByUUID(scopeID, regionID); | ||
173 | if (rinfo == null) | 180 | if (rinfo == null) |
174 | rinfo = m_RemoteGridService.GetRegionByUUID(scopeID, regionID); | 181 | rinfo = m_RemoteGridService.GetRegionByUUID(scopeID, regionID); |
175 | 182 | ||
183 | m_RegionInfoCache.Cache(scopeID,regionID,rinfo); | ||
176 | return rinfo; | 184 | return rinfo; |
177 | } | 185 | } |
178 | 186 | ||
@@ -187,10 +195,17 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
187 | 195 | ||
188 | public GridRegion GetRegionByName(UUID scopeID, string regionName) | 196 | public GridRegion GetRegionByName(UUID scopeID, string regionName) |
189 | { | 197 | { |
190 | GridRegion rinfo = m_LocalGridService.GetRegionByName(scopeID, regionName); | 198 | bool inCache = false; |
199 | GridRegion rinfo = m_RegionInfoCache.Get(scopeID,regionName, out inCache); | ||
200 | if (inCache) | ||
201 | return rinfo; | ||
202 | |||
203 | rinfo = m_LocalGridService.GetRegionByName(scopeID, regionName); | ||
191 | if (rinfo == null) | 204 | if (rinfo == null) |
192 | rinfo = m_RemoteGridService.GetRegionByName(scopeID, regionName); | 205 | rinfo = m_RemoteGridService.GetRegionByName(scopeID, regionName); |
193 | 206 | ||
207 | // can't cache negative results for name lookups | ||
208 | m_RegionInfoCache.Cache(rinfo); | ||
194 | return rinfo; | 209 | return rinfo; |
195 | } | 210 | } |
196 | 211 | ||
@@ -204,8 +219,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
204 | { | 219 | { |
205 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetRegionsByName {0} found {1} regions", name, grinfo.Count); | 220 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetRegionsByName {0} found {1} regions", name, grinfo.Count); |
206 | foreach (GridRegion r in grinfo) | 221 | foreach (GridRegion r in grinfo) |
222 | { | ||
223 | m_RegionInfoCache.Cache(r); | ||
207 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) | 224 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) |
208 | rinfo.Add(r); | 225 | rinfo.Add(r); |
226 | } | ||
209 | } | 227 | } |
210 | 228 | ||
211 | return rinfo; | 229 | return rinfo; |
@@ -221,8 +239,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
221 | { | 239 | { |
222 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetRegionRange {0} found {1} regions", name, grinfo.Count); | 240 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetRegionRange {0} found {1} regions", name, grinfo.Count); |
223 | foreach (GridRegion r in grinfo) | 241 | foreach (GridRegion r in grinfo) |
242 | { | ||
243 | m_RegionInfoCache.Cache(r); | ||
224 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) | 244 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) |
225 | rinfo.Add(r); | 245 | rinfo.Add(r); |
246 | } | ||
226 | } | 247 | } |
227 | 248 | ||
228 | return rinfo; | 249 | return rinfo; |
@@ -238,8 +259,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
238 | { | 259 | { |
239 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetDefaultRegions {0} found {1} regions", name, grinfo.Count); | 260 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetDefaultRegions {0} found {1} regions", name, grinfo.Count); |
240 | foreach (GridRegion r in grinfo) | 261 | foreach (GridRegion r in grinfo) |
262 | { | ||
263 | m_RegionInfoCache.Cache(r); | ||
241 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) | 264 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) |
242 | rinfo.Add(r); | 265 | rinfo.Add(r); |
266 | } | ||
243 | } | 267 | } |
244 | 268 | ||
245 | return rinfo; | 269 | return rinfo; |
@@ -255,8 +279,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
255 | { | 279 | { |
256 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetFallbackRegions {0} found {1} regions", name, grinfo.Count); | 280 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetFallbackRegions {0} found {1} regions", name, grinfo.Count); |
257 | foreach (GridRegion r in grinfo) | 281 | foreach (GridRegion r in grinfo) |
282 | { | ||
283 | m_RegionInfoCache.Cache(r); | ||
258 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) | 284 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) |
259 | rinfo.Add(r); | 285 | rinfo.Add(r); |
286 | } | ||
260 | } | 287 | } |
261 | 288 | ||
262 | return rinfo; | 289 | return rinfo; |
@@ -272,8 +299,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid | |||
272 | { | 299 | { |
273 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetHyperlinks {0} found {1} regions", name, grinfo.Count); | 300 | //m_log.DebugFormat("[REMOTE GRID CONNECTOR]: Remote GetHyperlinks {0} found {1} regions", name, grinfo.Count); |
274 | foreach (GridRegion r in grinfo) | 301 | foreach (GridRegion r in grinfo) |
302 | { | ||
303 | m_RegionInfoCache.Cache(r); | ||
275 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) | 304 | if (rinfo.Find(delegate(GridRegion gr) { return gr.RegionID == r.RegionID; }) == null) |
276 | rinfo.Add(r); | 305 | rinfo.Add(r); |
306 | } | ||
277 | } | 307 | } |
278 | 308 | ||
279 | return rinfo; | 309 | return rinfo; |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs index ee90859..e224670 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | |||
@@ -112,6 +112,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
112 | 112 | ||
113 | Object[] args = new Object[] { source }; | 113 | Object[] args = new Object[] { source }; |
114 | m_MapService = ServerUtils.LoadPlugin<IMapImageService>(service, args); | 114 | m_MapService = ServerUtils.LoadPlugin<IMapImageService>(service, args); |
115 | if (m_MapService == null) | ||
116 | { | ||
117 | m_log.WarnFormat("[MAP IMAGE SERVICE MODULE]: Unable to load LocalServiceModule from {0}. MapService module disabled. Please fix the configuration.", service); | ||
118 | return; | ||
119 | } | ||
115 | 120 | ||
116 | m_refreshTimer.Enabled = true; | 121 | m_refreshTimer.Enabled = true; |
117 | m_refreshTimer.AutoReset = true; | 122 | m_refreshTimer.AutoReset = true; |
@@ -202,7 +207,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
202 | { | 207 | { |
203 | m_log.DebugFormat("[MAP IMAGE SERVICE MODULE]: upload maptile for {0}", scene.RegionInfo.RegionName); | 208 | m_log.DebugFormat("[MAP IMAGE SERVICE MODULE]: upload maptile for {0}", scene.RegionInfo.RegionName); |
204 | 209 | ||
205 | // Create a PNG map tile and upload it to the AddMapTile API | 210 | // Create a JPG map tile and upload it to the AddMapTile API |
206 | byte[] jpgData = Utils.EmptyBytes; | 211 | byte[] jpgData = Utils.EmptyBytes; |
207 | IMapImageGenerator tileGenerator = scene.RequestModuleInterface<IMapImageGenerator>(); | 212 | IMapImageGenerator tileGenerator = scene.RequestModuleInterface<IMapImageGenerator>(); |
208 | if (tileGenerator == null) | 213 | if (tileGenerator == null) |
@@ -220,13 +225,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
220 | } | 225 | } |
221 | } | 226 | } |
222 | 227 | ||
228 | if (jpgData == Utils.EmptyBytes) | ||
229 | { | ||
230 | m_log.WarnFormat("[MAP IMAGE SERVICE MODULE]: Tile image generation failed"); | ||
231 | return; | ||
232 | } | ||
233 | |||
223 | string reason = string.Empty; | 234 | string reason = string.Empty; |
224 | if (!m_MapService.AddMapTile((int)scene.RegionInfo.RegionLocX, (int)scene.RegionInfo.RegionLocY, jpgData, out reason)) | 235 | if (!m_MapService.AddMapTile((int)scene.RegionInfo.RegionLocX, (int)scene.RegionInfo.RegionLocY, jpgData, out reason)) |
225 | { | 236 | { |
226 | m_log.DebugFormat("[MAP IMAGE SERVICE MODULE]: Unable to upload tile image for {0} at {1}-{2}: {3}", | 237 | m_log.DebugFormat("[MAP IMAGE SERVICE MODULE]: Unable to upload tile image for {0} at {1}-{2}: {3}", |
227 | scene.RegionInfo.RegionName, scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY, reason); | 238 | scene.RegionInfo.RegionName, scene.RegionInfo.RegionLocX, scene.RegionInfo.RegionLocY, reason); |
228 | } | 239 | } |
229 | |||
230 | } | 240 | } |
231 | } | 241 | } |
232 | } \ No newline at end of file | 242 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index 3078ab3..6a9c3d0 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | |||
@@ -198,11 +198,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
198 | m_log.ErrorFormat( | 198 | m_log.ErrorFormat( |
199 | "[ARCHIVER]: (... {0} more not shown)", uuids.Count - MAX_UUID_DISPLAY_ON_TIMEOUT); | 199 | "[ARCHIVER]: (... {0} more not shown)", uuids.Count - MAX_UUID_DISPLAY_ON_TIMEOUT); |
200 | 200 | ||
201 | m_log.Error("[ARCHIVER]: OAR save aborted. PLEASE DO NOT USE THIS OAR, IT WILL BE INCOMPLETE."); | 201 | m_log.Error("[ARCHIVER]: Archive save aborted. PLEASE DO NOT USE THIS ARCHIVE, IT WILL BE INCOMPLETE."); |
202 | } | 202 | } |
203 | catch (Exception e) | 203 | catch (Exception e) |
204 | { | 204 | { |
205 | m_log.ErrorFormat("[ARCHIVER]: Timeout handler exception {0}", e); | 205 | m_log.ErrorFormat("[ARCHIVER]: Timeout handler exception {0}{1}", e.Message, e.StackTrace); |
206 | } | 206 | } |
207 | finally | 207 | finally |
208 | { | 208 | { |
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs index 6eb57eb..6163fd1 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs | |||
@@ -52,7 +52,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
52 | public class Warp3DImageModule : IMapImageGenerator, INonSharedRegionModule | 52 | public class Warp3DImageModule : IMapImageGenerator, INonSharedRegionModule |
53 | { | 53 | { |
54 | private static readonly UUID TEXTURE_METADATA_MAGIC = new UUID("802dc0e0-f080-4931-8b57-d1be8611c4f3"); | 54 | private static readonly UUID TEXTURE_METADATA_MAGIC = new UUID("802dc0e0-f080-4931-8b57-d1be8611c4f3"); |
55 | private static readonly Color4 WATER_COLOR = new Color4(29, 71, 95, 216); | 55 | private static readonly Color4 WATER_COLOR = new Color4(29, 72, 96, 216); |
56 | 56 | ||
57 | private static readonly ILog m_log = | 57 | private static readonly ILog m_log = |
58 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 58 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -61,7 +61,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
61 | private IRendering m_primMesher; | 61 | private IRendering m_primMesher; |
62 | private IConfigSource m_config; | 62 | private IConfigSource m_config; |
63 | private Dictionary<UUID, Color4> m_colors = new Dictionary<UUID, Color4>(); | 63 | private Dictionary<UUID, Color4> m_colors = new Dictionary<UUID, Color4>(); |
64 | private bool m_useAntiAliasing = true; // TODO: Make this a config option | 64 | private bool m_useAntiAliasing = false; // TODO: Make this a config option |
65 | private bool m_Enabled = false; | 65 | private bool m_Enabled = false; |
66 | 66 | ||
67 | #region IRegionModule Members | 67 | #region IRegionModule Members |
@@ -192,8 +192,8 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
192 | 192 | ||
193 | #endregion Camera | 193 | #endregion Camera |
194 | 194 | ||
195 | renderer.Scene.addLight("Light1", new warp_Light(new warp_Vector(0.2f, 0.2f, 1f), 0xffffff, 320, 80)); | 195 | renderer.Scene.addLight("Light1", new warp_Light(new warp_Vector(1.0f, 0.5f, 1f), 0xffffff, 0, 320, 40)); |
196 | renderer.Scene.addLight("Light2", new warp_Light(new warp_Vector(-1f, -1f, 1f), 0xffffff, 100, 40)); | 196 | renderer.Scene.addLight("Light2", new warp_Light(new warp_Vector(-1f, -1f, 1f), 0xffffff, 0, 100, 40)); |
197 | 197 | ||
198 | CreateWater(renderer); | 198 | CreateWater(renderer); |
199 | CreateTerrain(renderer, textureTerrain); | 199 | CreateTerrain(renderer, textureTerrain); |
@@ -237,6 +237,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
237 | renderer.Scene.sceneobject("Water").setPos(127.5f, waterHeight, 127.5f); | 237 | renderer.Scene.sceneobject("Water").setPos(127.5f, waterHeight, 127.5f); |
238 | 238 | ||
239 | renderer.AddMaterial("WaterColor", ConvertColor(WATER_COLOR)); | 239 | renderer.AddMaterial("WaterColor", ConvertColor(WATER_COLOR)); |
240 | renderer.Scene.material("WaterColor").setReflectivity(0); // match water color with standard map module thanks lkalif | ||
240 | renderer.Scene.material("WaterColor").setTransparency((byte)((1f - WATER_COLOR.A) * 255f)); | 241 | renderer.Scene.material("WaterColor").setTransparency((byte)((1f - WATER_COLOR.A) * 255f)); |
241 | renderer.SetObjectMaterial("Water", "WaterColor"); | 242 | renderer.SetObjectMaterial("Water", "WaterColor"); |
242 | } | 243 | } |
@@ -322,6 +323,7 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
322 | warp_Material material = new warp_Material(texture); | 323 | warp_Material material = new warp_Material(texture); |
323 | material.setReflectivity(50); | 324 | material.setReflectivity(50); |
324 | renderer.Scene.addMaterial("TerrainColor", material); | 325 | renderer.Scene.addMaterial("TerrainColor", material); |
326 | renderer.Scene.material("TerrainColor").setReflectivity(0); // reduces tile seams a bit thanks lkalif | ||
325 | renderer.SetObjectMaterial("Terrain", "TerrainColor"); | 327 | renderer.SetObjectMaterial("Terrain", "TerrainColor"); |
326 | } | 328 | } |
327 | 329 | ||
@@ -653,4 +655,4 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
653 | return result; | 655 | return result; |
654 | } | 656 | } |
655 | } | 657 | } |
656 | } | 658 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs index 00959b0..2e3b21f 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs | |||
@@ -91,6 +91,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
91 | remoteClient.SendAlertMessage("Use a search string with at least 3 characters"); | 91 | remoteClient.SendAlertMessage("Use a search string with at least 3 characters"); |
92 | return; | 92 | return; |
93 | } | 93 | } |
94 | |||
95 | m_log.DebugFormat("MAP NAME=({0})", mapName); | ||
94 | 96 | ||
95 | // try to fetch from GridServer | 97 | // try to fetch from GridServer |
96 | List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); | 98 | List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); |
@@ -103,7 +105,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
103 | if (info != null) | 105 | if (info != null) |
104 | regionInfos.Add(info); | 106 | regionInfos.Add(info); |
105 | } | 107 | } |
106 | else if (regionInfos.Count == 0 && mapName.StartsWith("http://")) | 108 | else if (regionInfos.Count == 0) |
107 | remoteClient.SendAlertMessage("Hyperlink could not be established."); | 109 | remoteClient.SendAlertMessage("Hyperlink could not be established."); |
108 | 110 | ||
109 | m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions. Flags={2}", mapName, regionInfos.Count, flags); | 111 | m_log.DebugFormat("[MAPSEARCHMODULE]: search {0} returned {1} regions. Flags={2}", mapName, regionInfos.Count, flags); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 79660a3..42ac9aa 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1449,19 +1449,25 @@ namespace OpenSim.Region.Framework.Scenes | |||
1449 | 1449 | ||
1450 | foreach (SceneObjectPart part in partList) | 1450 | foreach (SceneObjectPart part in partList) |
1451 | { | 1451 | { |
1452 | SceneObjectPart newPart; | ||
1452 | if (part.UUID != m_rootPart.UUID) | 1453 | if (part.UUID != m_rootPart.UUID) |
1453 | { | 1454 | { |
1454 | SceneObjectPart newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); | 1455 | newPart = dupe.CopyPart(part, OwnerID, GroupID, userExposed); |
1455 | newPart.LinkNum = part.LinkNum; | 1456 | newPart.LinkNum = part.LinkNum; |
1456 | } | 1457 | } |
1458 | else | ||
1459 | { | ||
1460 | newPart = dupe.m_rootPart; | ||
1461 | } | ||
1457 | 1462 | ||
1458 | // Need to duplicate the physics actor as well | 1463 | // Need to duplicate the physics actor as well |
1459 | if (part.PhysActor != null && userExposed) | 1464 | if (part.PhysActor != null && userExposed) |
1460 | { | 1465 | { |
1461 | PrimitiveBaseShape pbs = part.Shape; | 1466 | PrimitiveBaseShape pbs = part.Shape; |
1462 | 1467 | ||
1463 | part.PhysActor | 1468 | newPart.PhysActor |
1464 | = m_scene.PhysicsScene.AddPrimShape( | 1469 | = m_scene.PhysicsScene.AddPrimShape( |
1470 | part.LocalId, | ||
1465 | string.Format("{0}/{1}", part.Name, part.UUID), | 1471 | string.Format("{0}/{1}", part.Name, part.UUID), |
1466 | pbs, | 1472 | pbs, |
1467 | part.AbsolutePosition, | 1473 | part.AbsolutePosition, |
@@ -1469,8 +1475,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1469 | part.RotationOffset, | 1475 | part.RotationOffset, |
1470 | part.PhysActor.IsPhysical); | 1476 | part.PhysActor.IsPhysical); |
1471 | 1477 | ||
1472 | part.PhysActor.LocalID = part.LocalId; | 1478 | newPart.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); |
1473 | part.DoPhysicsPropertyUpdate(part.PhysActor.IsPhysical, true); | ||
1474 | } | 1479 | } |
1475 | } | 1480 | } |
1476 | 1481 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index a215b20..c6d8c73 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1582,6 +1582,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1582 | if (!isPhantom && !IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible)) | 1582 | if (!isPhantom && !IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible)) |
1583 | { | 1583 | { |
1584 | PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( | 1584 | PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( |
1585 | LocalId, | ||
1585 | string.Format("{0}/{1}", Name, UUID), | 1586 | string.Format("{0}/{1}", Name, UUID), |
1586 | Shape, | 1587 | Shape, |
1587 | AbsolutePosition, | 1588 | AbsolutePosition, |
@@ -1594,7 +1595,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1594 | { | 1595 | { |
1595 | PhysActor.SOPName = this.Name; // save object name and desc into the PhysActor so ODE internals know the joint/body info | 1596 | PhysActor.SOPName = this.Name; // save object name and desc into the PhysActor so ODE internals know the joint/body info |
1596 | PhysActor.SOPDescription = this.Description; | 1597 | PhysActor.SOPDescription = this.Description; |
1597 | PhysActor.LocalID = LocalId; | ||
1598 | DoPhysicsPropertyUpdate(RigidBody, true); | 1598 | DoPhysicsPropertyUpdate(RigidBody, true); |
1599 | PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); | 1599 | PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); |
1600 | } | 1600 | } |
@@ -4410,6 +4410,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4410 | { | 4410 | { |
4411 | // It's not phantom anymore. So make sure the physics engine get's knowledge of it | 4411 | // It's not phantom anymore. So make sure the physics engine get's knowledge of it |
4412 | PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( | 4412 | PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( |
4413 | LocalId, | ||
4413 | string.Format("{0}/{1}", Name, UUID), | 4414 | string.Format("{0}/{1}", Name, UUID), |
4414 | Shape, | 4415 | Shape, |
4415 | AbsolutePosition, | 4416 | AbsolutePosition, |
@@ -4420,7 +4421,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4420 | pa = PhysActor; | 4421 | pa = PhysActor; |
4421 | if (pa != null) | 4422 | if (pa != null) |
4422 | { | 4423 | { |
4423 | pa.LocalID = LocalId; | ||
4424 | DoPhysicsPropertyUpdate(UsePhysics, true); | 4424 | DoPhysicsPropertyUpdate(UsePhysics, true); |
4425 | if (m_parentGroup != null) | 4425 | if (m_parentGroup != null) |
4426 | { | 4426 | { |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f6295b1..80aafd0 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3295,7 +3295,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3295 | Vector3 pVec = AbsolutePosition; | 3295 | Vector3 pVec = AbsolutePosition; |
3296 | 3296 | ||
3297 | // Old bug where the height was in centimeters instead of meters | 3297 | // Old bug where the height was in centimeters instead of meters |
3298 | m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, | 3298 | m_physicsActor = scene.AddAvatar(LocalId, Firstname + "." + Lastname, pVec, |
3299 | new Vector3(0f, 0f, m_appearance.AvatarHeight), isFlying); | 3299 | new Vector3(0f, 0f, m_appearance.AvatarHeight), isFlying); |
3300 | 3300 | ||
3301 | scene.AddPhysicsActorTaint(m_physicsActor); | 3301 | scene.AddPhysicsActorTaint(m_physicsActor); |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index 42efd67..a5bba4f 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | |||
@@ -417,9 +417,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
417 | public string ParcelVoiceInfoRequest(Scene scene, string request, string path, string param, | 417 | public string ParcelVoiceInfoRequest(Scene scene, string request, string path, string param, |
418 | UUID agentID, Caps caps) | 418 | UUID agentID, Caps caps) |
419 | { | 419 | { |
420 | // m_log.DebugFormat( | 420 | m_log.DebugFormat( |
421 | // "[FreeSwitchVoice][PARCELVOICE]: ParcelVoiceInfoRequest() on {0} for {1}", | 421 | "[FreeSwitchVoice][PARCELVOICE]: ParcelVoiceInfoRequest() on {0} for {1}", |
422 | // scene.RegionInfo.RegionName, agentID); | 422 | scene.RegionInfo.RegionName, agentID); |
423 | 423 | ||
424 | ScenePresence avatar = scene.GetScenePresence(agentID); | 424 | ScenePresence avatar = scene.GetScenePresence(agentID); |
425 | string avatarName = avatar.Name; | 425 | string avatarName = avatar.Name; |
@@ -885,4 +885,4 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice | |||
885 | 885 | ||
886 | #endregion | 886 | #endregion |
887 | } | 887 | } |
888 | } \ No newline at end of file | 888 | } |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 880c3ea..1c36e55 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs | |||
@@ -142,7 +142,12 @@ namespace OpenSim.Region.Physics.Manager | |||
142 | 142 | ||
143 | public abstract PrimitiveBaseShape Shape { set; } | 143 | public abstract PrimitiveBaseShape Shape { set; } |
144 | 144 | ||
145 | public abstract uint LocalID { set; } | 145 | uint m_baseLocalID; |
146 | public virtual uint LocalID | ||
147 | { | ||
148 | set { m_baseLocalID = value; } | ||
149 | get { return m_baseLocalID; } | ||
150 | } | ||
146 | 151 | ||
147 | public abstract bool Grabbed { set; } | 152 | public abstract bool Grabbed { set; } |
148 | 153 | ||
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 217d307..54c50f8 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -66,6 +66,13 @@ namespace OpenSim.Region.Physics.Manager | |||
66 | 66 | ||
67 | public abstract PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying); | 67 | public abstract PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying); |
68 | 68 | ||
69 | public virtual PhysicsActor AddAvatar(uint localID, string avName, Vector3 position, Vector3 size, bool isFlying) | ||
70 | { | ||
71 | PhysicsActor ret = AddAvatar(avName, position, size, isFlying); | ||
72 | if (ret != null) ret.LocalID = localID; | ||
73 | return ret; | ||
74 | } | ||
75 | |||
69 | public abstract void RemoveAvatar(PhysicsActor actor); | 76 | public abstract void RemoveAvatar(PhysicsActor actor); |
70 | 77 | ||
71 | public abstract void RemovePrim(PhysicsActor prim); | 78 | public abstract void RemovePrim(PhysicsActor prim); |
@@ -75,6 +82,14 @@ namespace OpenSim.Region.Physics.Manager | |||
75 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, | 82 | public abstract PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, |
76 | Vector3 size, Quaternion rotation, bool isPhysical); | 83 | Vector3 size, Quaternion rotation, bool isPhysical); |
77 | 84 | ||
85 | public virtual PhysicsActor AddPrimShape(uint localID, string primName, PrimitiveBaseShape pbs, Vector3 position, | ||
86 | Vector3 size, Quaternion rotation, bool isPhysical) | ||
87 | { | ||
88 | PhysicsActor ret = AddPrimShape(primName, pbs, position, size, rotation, isPhysical); | ||
89 | if (ret != null) ret.LocalID = localID; | ||
90 | return ret; | ||
91 | } | ||
92 | |||
78 | public virtual float TimeDilation | 93 | public virtual float TimeDilation |
79 | { | 94 | { |
80 | get { return 1.0f; } | 95 | get { return 1.0f; } |
diff --git a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs index a953cd7..99f98b6 100644 --- a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs +++ b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs | |||
@@ -26,7 +26,14 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
30 | using System.IO; | ||
31 | using System.Reflection; | ||
32 | using System.Xml; | ||
33 | |||
29 | using Nini.Config; | 34 | using Nini.Config; |
35 | using log4net; | ||
36 | |||
30 | using OpenSim.Server.Base; | 37 | using OpenSim.Server.Base; |
31 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
32 | using OpenSim.Framework.Servers.HttpServer; | 39 | using OpenSim.Framework.Servers.HttpServer; |
@@ -55,7 +62,122 @@ namespace OpenSim.Server.Handlers.MapImage | |||
55 | Object[] args = new Object[] { config }; | 62 | Object[] args = new Object[] { config }; |
56 | m_MapService = ServerUtils.LoadPlugin<IMapImageService>(gridService, args); | 63 | m_MapService = ServerUtils.LoadPlugin<IMapImageService>(gridService, args); |
57 | 64 | ||
58 | //server.AddStreamHandler(new PresenceServerPostHandler(m_PresenceService)); | 65 | server.AddStreamHandler(new MapServerPostHandler(m_MapService)); |
66 | } | ||
67 | } | ||
68 | |||
69 | class MapServerPostHandler : BaseStreamHandler | ||
70 | { | ||
71 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
72 | private IMapImageService m_MapService; | ||
73 | |||
74 | public MapServerPostHandler(IMapImageService service) : | ||
75 | base("POST", "/map") | ||
76 | { | ||
77 | m_MapService = service; | ||
78 | } | ||
79 | |||
80 | public override byte[] Handle(string path, Stream requestData, OSHttpRequest httpRequest, OSHttpResponse httpResponse) | ||
81 | { | ||
82 | m_log.DebugFormat("[MAP SERVICE IMAGE HANDLER]: Received {0}", path); | ||
83 | StreamReader sr = new StreamReader(requestData); | ||
84 | string body = sr.ReadToEnd(); | ||
85 | sr.Close(); | ||
86 | body = body.Trim(); | ||
87 | |||
88 | try | ||
89 | { | ||
90 | Dictionary<string, object> request = ServerUtils.ParseQueryString(body); | ||
91 | |||
92 | if (!request.ContainsKey("X") || !request.ContainsKey("Y") || !request.ContainsKey("DATA")) | ||
93 | { | ||
94 | httpResponse.StatusCode = (int)OSHttpStatusCode.ClientErrorBadRequest; | ||
95 | return FailureResult("Bad request."); | ||
96 | } | ||
97 | int x = 0, y = 0; | ||
98 | Int32.TryParse(request["X"].ToString(), out x); | ||
99 | Int32.TryParse(request["Y"].ToString(), out y); | ||
100 | string type = "image/jpeg"; | ||
101 | if (request.ContainsKey("TYPE")) | ||
102 | type = request["TYPE"].ToString(); | ||
103 | byte[] data = Convert.FromBase64String(request["DATA"].ToString()); | ||
104 | |||
105 | string reason = string.Empty; | ||
106 | bool result = m_MapService.AddMapTile(x, y, data, out reason); | ||
107 | |||
108 | if (result) | ||
109 | return SuccessResult(); | ||
110 | else | ||
111 | return FailureResult(reason); | ||
112 | |||
113 | } | ||
114 | catch (Exception e) | ||
115 | { | ||
116 | m_log.ErrorFormat("[MAP SERVICE IMAGE HANDLER]: Exception {0} {1}", e.Message, e.StackTrace); | ||
117 | } | ||
118 | |||
119 | return FailureResult("Unexpected server error"); | ||
120 | |||
121 | } | ||
122 | |||
123 | private byte[] SuccessResult() | ||
124 | { | ||
125 | XmlDocument doc = new XmlDocument(); | ||
126 | |||
127 | XmlNode xmlnode = doc.CreateNode(XmlNodeType.XmlDeclaration, | ||
128 | "", ""); | ||
129 | |||
130 | doc.AppendChild(xmlnode); | ||
131 | |||
132 | XmlElement rootElement = doc.CreateElement("", "ServerResponse", | ||
133 | ""); | ||
134 | |||
135 | doc.AppendChild(rootElement); | ||
136 | |||
137 | XmlElement result = doc.CreateElement("", "Result", ""); | ||
138 | result.AppendChild(doc.CreateTextNode("Success")); | ||
139 | |||
140 | rootElement.AppendChild(result); | ||
141 | |||
142 | return DocToBytes(doc); | ||
143 | } | ||
144 | |||
145 | private byte[] FailureResult(string msg) | ||
146 | { | ||
147 | XmlDocument doc = new XmlDocument(); | ||
148 | |||
149 | XmlNode xmlnode = doc.CreateNode(XmlNodeType.XmlDeclaration, | ||
150 | "", ""); | ||
151 | |||
152 | doc.AppendChild(xmlnode); | ||
153 | |||
154 | XmlElement rootElement = doc.CreateElement("", "ServerResponse", | ||
155 | ""); | ||
156 | |||
157 | doc.AppendChild(rootElement); | ||
158 | |||
159 | XmlElement result = doc.CreateElement("", "Result", ""); | ||
160 | result.AppendChild(doc.CreateTextNode("Failure")); | ||
161 | |||
162 | rootElement.AppendChild(result); | ||
163 | |||
164 | XmlElement message = doc.CreateElement("", "Message", ""); | ||
165 | message.AppendChild(doc.CreateTextNode(msg)); | ||
166 | |||
167 | rootElement.AppendChild(message); | ||
168 | |||
169 | return DocToBytes(doc); | ||
170 | } | ||
171 | |||
172 | private byte[] DocToBytes(XmlDocument doc) | ||
173 | { | ||
174 | MemoryStream ms = new MemoryStream(); | ||
175 | XmlTextWriter xw = new XmlTextWriter(ms, null); | ||
176 | xw.Formatting = Formatting.Indented; | ||
177 | doc.WriteTo(xw); | ||
178 | xw.Flush(); | ||
179 | |||
180 | return ms.ToArray(); | ||
59 | } | 181 | } |
60 | } | 182 | } |
61 | } | 183 | } |
diff --git a/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs b/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs index 53d08fa..e8a424f 100644 --- a/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs +++ b/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs | |||
@@ -80,7 +80,6 @@ namespace OpenSim.Server.Handlers.MapImage | |||
80 | 80 | ||
81 | public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 81 | public override byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
82 | { | 82 | { |
83 | m_log.DebugFormat("[MAP SERVICE IMAGE HANDLER]: retrieving {0}", path); | ||
84 | byte[] result = new byte[0]; | 83 | byte[] result = new byte[0]; |
85 | 84 | ||
86 | string format = string.Empty; | 85 | string format = string.Empty; |
diff --git a/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs b/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs index ff0e9d9..520d639 100644 --- a/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs +++ b/OpenSim/Services/Connectors/MapImage/MapImageServiceConnector.cs | |||
@@ -36,6 +36,7 @@ using Nini.Config; | |||
36 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
37 | using OpenSim.Framework.Console; | 37 | using OpenSim.Framework.Console; |
38 | using OpenSim.Framework.Communications; | 38 | using OpenSim.Framework.Communications; |
39 | using OpenSim.Server.Base; | ||
39 | using OpenSim.Services.Interfaces; | 40 | using OpenSim.Services.Interfaces; |
40 | using OpenMetaverse; | 41 | using OpenMetaverse; |
41 | using OpenMetaverse.StructuredData; | 42 | using OpenMetaverse.StructuredData; |
@@ -83,60 +84,57 @@ namespace OpenSim.Services.Connectors | |||
83 | throw new Exception("MapImage connector init error"); | 84 | throw new Exception("MapImage connector init error"); |
84 | } | 85 | } |
85 | m_ServerURI = serviceURI; | 86 | m_ServerURI = serviceURI; |
87 | m_ServerURI = serviceURI.TrimEnd('/'); | ||
86 | } | 88 | } |
87 | 89 | ||
88 | public bool AddMapTile(int x, int y, byte[] pngData, out string reason) | 90 | public bool AddMapTile(int x, int y, byte[] jpgData, out string reason) |
89 | { | 91 | { |
90 | List<MultipartForm.Element> postParameters = new List<MultipartForm.Element>() | 92 | reason = string.Empty; |
91 | { | ||
92 | new MultipartForm.Parameter("X", x.ToString()), | ||
93 | new MultipartForm.Parameter("Y", y.ToString()), | ||
94 | new MultipartForm.File("Tile", "tile.png", "image/png", pngData) | ||
95 | }; | ||
96 | |||
97 | reason = string.Empty; | ||
98 | int tickstart = Util.EnvironmentTickCount(); | 93 | int tickstart = Util.EnvironmentTickCount(); |
94 | Dictionary<string, object> sendData = new Dictionary<string, object>(); | ||
95 | sendData["X"] = x.ToString(); | ||
96 | sendData["Y"] = y.ToString(); | ||
97 | sendData["TYPE"] = "image/jpeg"; | ||
98 | sendData["DATA"] = Convert.ToBase64String(jpgData); | ||
99 | |||
100 | string reqString = ServerUtils.BuildQueryString(sendData); | ||
99 | 101 | ||
100 | // Make the remote storage request | ||
101 | try | 102 | try |
102 | { | 103 | { |
103 | HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI); | 104 | string reply = SynchronousRestFormsRequester.MakeRequest("POST", |
104 | request.Timeout = 20000; | 105 | m_ServerURI + "/map", |
105 | request.ReadWriteTimeout = 5000; | 106 | reqString); |
106 | 107 | if (reply != string.Empty) | |
107 | using (HttpWebResponse response = MultipartForm.Post(request, postParameters)) | ||
108 | { | 108 | { |
109 | using (Stream responseStream = response.GetResponseStream()) | 109 | Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply); |
110 | |||
111 | if (replyData.ContainsKey("Result") && (replyData["Result"].ToString().ToLower() == "success")) | ||
110 | { | 112 | { |
111 | string responseStr = responseStream.GetStreamString(); | 113 | return true; |
112 | OSD responseOSD = OSDParser.Deserialize(responseStr); | ||
113 | if (responseOSD.Type == OSDType.Map) | ||
114 | { | ||
115 | OSDMap responseMap = (OSDMap)responseOSD; | ||
116 | if (responseMap["Success"].AsBoolean()) | ||
117 | return true; | ||
118 | |||
119 | reason = "Upload failed: " + responseMap["Message"].AsString(); | ||
120 | } | ||
121 | else | ||
122 | { | ||
123 | reason = "Response format was invalid:\n" + responseStr; | ||
124 | } | ||
125 | } | 114 | } |
115 | else if (replyData.ContainsKey("Result") && (replyData["Result"].ToString().ToLower() == "failure")) | ||
116 | { | ||
117 | m_log.DebugFormat("[MAP IMAGE CONNECTOR]: Registration failed: {0}", replyData["Message"].ToString()); | ||
118 | reason = replyData["Message"].ToString(); | ||
119 | return false; | ||
120 | } | ||
121 | else if (!replyData.ContainsKey("Result")) | ||
122 | { | ||
123 | m_log.DebugFormat("[MAP IMAGE CONNECTOR]: reply data does not contain result field"); | ||
124 | } | ||
125 | else | ||
126 | { | ||
127 | m_log.DebugFormat("[MAP IMAGE CONNECTOR]: unexpected result {0}", replyData["Result"].ToString()); | ||
128 | reason = "Unexpected result " + replyData["Result"].ToString(); | ||
129 | } | ||
130 | |||
126 | } | 131 | } |
132 | else | ||
133 | m_log.DebugFormat("[MAP IMAGE CONNECTOR]: RegisterRegion received null reply"); | ||
127 | } | 134 | } |
128 | catch (WebException we) | 135 | catch (Exception e) |
129 | { | ||
130 | reason = we.Message; | ||
131 | if (we.Status == WebExceptionStatus.ProtocolError) | ||
132 | { | ||
133 | HttpWebResponse webResponse = (HttpWebResponse)we.Response; | ||
134 | reason = String.Format("[{0}] {1}", webResponse.StatusCode, webResponse.StatusDescription); | ||
135 | } | ||
136 | } | ||
137 | catch (Exception ex) | ||
138 | { | 136 | { |
139 | reason = ex.Message; | 137 | m_log.DebugFormat("[MAP IMAGE CONNECTOR]: Exception when contacting grid server: {0}", e.Message); |
140 | } | 138 | } |
141 | finally | 139 | finally |
142 | { | 140 | { |
@@ -146,6 +144,7 @@ namespace OpenSim.Services.Connectors | |||
146 | } | 144 | } |
147 | 145 | ||
148 | return false; | 146 | return false; |
147 | |||
149 | } | 148 | } |
150 | 149 | ||
151 | public byte[] GetMapTile(string fileName, out string format) | 150 | public byte[] GetMapTile(string fileName, out string format) |
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 5262598..83ec122 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -63,7 +63,7 @@ namespace OpenSim.Services.GridService | |||
63 | protected GatekeeperServiceConnector m_GatekeeperConnector; | 63 | protected GatekeeperServiceConnector m_GatekeeperConnector; |
64 | 64 | ||
65 | protected UUID m_ScopeID = UUID.Zero; | 65 | protected UUID m_ScopeID = UUID.Zero; |
66 | protected bool m_Check4096 = true; | 66 | // protected bool m_Check4096 = true; |
67 | protected string m_MapTileDirectory = string.Empty; | 67 | protected string m_MapTileDirectory = string.Empty; |
68 | protected string m_ThisGatekeeper = string.Empty; | 68 | protected string m_ThisGatekeeper = string.Empty; |
69 | protected Uri m_ThisGatekeeperURI = null; | 69 | protected Uri m_ThisGatekeeperURI = null; |
@@ -121,7 +121,7 @@ namespace OpenSim.Services.GridService | |||
121 | if (scope != string.Empty) | 121 | if (scope != string.Empty) |
122 | UUID.TryParse(scope, out m_ScopeID); | 122 | UUID.TryParse(scope, out m_ScopeID); |
123 | 123 | ||
124 | m_Check4096 = gridConfig.GetBoolean("Check4096", true); | 124 | // m_Check4096 = gridConfig.GetBoolean("Check4096", true); |
125 | 125 | ||
126 | m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles"); | 126 | m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles"); |
127 | 127 | ||
@@ -347,14 +347,18 @@ namespace OpenSim.Services.GridService | |||
347 | return true; | 347 | return true; |
348 | } | 348 | } |
349 | 349 | ||
350 | uint x, y; | 350 | // We are now performing this check for each individual teleport in the EntityTransferModule instead. This |
351 | if (m_Check4096 && !Check4096(handle, out x, out y)) | 351 | // allows us to give better feedback when teleports fail because of the distance reason (which can't be |
352 | { | 352 | // done here) and it also hypergrid teleports that are within range (possibly because the source grid |
353 | RemoveHyperlinkRegion(regInfo.RegionID); | 353 | // itself has regions that are very far apart). |
354 | reason = "Region is too far (" + x + ", " + y + ")"; | 354 | // uint x, y; |
355 | m_log.Info("[HYPERGRID LINKER]: Unable to link, region is too far (" + x + ", " + y + ")"); | 355 | // if (m_Check4096 && !Check4096(handle, out x, out y)) |
356 | return false; | 356 | // { |
357 | } | 357 | // //RemoveHyperlinkRegion(regInfo.RegionID); |
358 | // reason = "Region is too far (" + x + ", " + y + ")"; | ||
359 | // m_log.Info("[HYPERGRID LINKER]: Unable to link, region is too far (" + x + ", " + y + ")"); | ||
360 | // //return false; | ||
361 | // } | ||
358 | 362 | ||
359 | regInfo.RegionID = regionID; | 363 | regInfo.RegionID = regionID; |
360 | 364 | ||
@@ -405,60 +409,59 @@ namespace OpenSim.Services.GridService | |||
405 | } | 409 | } |
406 | } | 410 | } |
407 | 411 | ||
408 | /// <summary> | 412 | // Not currently used |
409 | /// Cope with this viewer limitation. | 413 | // /// <summary> |
410 | /// </summary> | 414 | // /// Cope with this viewer limitation. |
411 | /// <param name="regInfo"></param> | 415 | // /// </summary> |
412 | /// <returns></returns> | 416 | // /// <param name="regInfo"></param> |
413 | public bool Check4096(ulong realHandle, out uint x, out uint y) | 417 | // /// <returns></returns> |
414 | { | 418 | // public bool Check4096(ulong realHandle, out uint x, out uint y) |
415 | uint ux = 0, uy = 0; | 419 | // { |
416 | Utils.LongToUInts(realHandle, out ux, out uy); | 420 | // uint ux = 0, uy = 0; |
417 | x = ux / Constants.RegionSize; | 421 | // Utils.LongToUInts(realHandle, out ux, out uy); |
418 | y = uy / Constants.RegionSize; | 422 | // x = ux / Constants.RegionSize; |
419 | 423 | // y = uy / Constants.RegionSize; | |
420 | const uint limit = (4096 - 1) * Constants.RegionSize; | 424 | // |
421 | uint xmin = ux - limit; | 425 | // const uint limit = (4096 - 1) * Constants.RegionSize; |
422 | uint xmax = ux + limit; | 426 | // uint xmin = ux - limit; |
423 | uint ymin = uy - limit; | 427 | // uint xmax = ux + limit; |
424 | uint ymax = uy + limit; | 428 | // uint ymin = uy - limit; |
425 | // World map boundary checks | 429 | // uint ymax = uy + limit; |
426 | if (xmin < 0 || xmin > ux) | 430 | // // World map boundary checks |
427 | xmin = 0; | 431 | // if (xmin < 0 || xmin > ux) |
428 | if (xmax > int.MaxValue || xmax < ux) | 432 | // xmin = 0; |
429 | xmax = int.MaxValue; | 433 | // if (xmax > int.MaxValue || xmax < ux) |
430 | if (ymin < 0 || ymin > uy) | 434 | // xmax = int.MaxValue; |
431 | ymin = 0; | 435 | // if (ymin < 0 || ymin > uy) |
432 | if (ymax > int.MaxValue || ymax < uy) | 436 | // ymin = 0; |
433 | ymax = int.MaxValue; | 437 | // if (ymax > int.MaxValue || ymax < uy) |
434 | 438 | // ymax = int.MaxValue; | |
435 | // Check for any regions that are within the possible teleport range to the linked region | 439 | // |
436 | List<GridRegion> regions = m_GridService.GetRegionRange(m_ScopeID, (int)xmin, (int)xmax, (int)ymin, (int)ymax); | 440 | // // Check for any regions that are within the possible teleport range to the linked region |
437 | if (regions.Count == 0) | 441 | // List<GridRegion> regions = m_GridService.GetRegionRange(m_ScopeID, (int)xmin, (int)xmax, (int)ymin, (int)ymax); |
438 | { | 442 | // if (regions.Count == 0) |
439 | return false; | 443 | // { |
440 | } | 444 | // return false; |
441 | else | 445 | // } |
442 | { | 446 | // else |
443 | // Check for regions which are not linked regions | 447 | // { |
444 | List<GridRegion> hyperlinks = m_GridService.GetHyperlinks(m_ScopeID); | 448 | // // Check for regions which are not linked regions |
445 | IEnumerable<GridRegion> availableRegions = regions.Except(hyperlinks); | 449 | // List<GridRegion> hyperlinks = m_GridService.GetHyperlinks(m_ScopeID); |
446 | if (availableRegions.Count() == 0) | 450 | // IEnumerable<GridRegion> availableRegions = regions.Except(hyperlinks); |
447 | return false; | 451 | // if (availableRegions.Count() == 0) |
448 | } | 452 | // return false; |
449 | 453 | // } | |
450 | return true; | 454 | // |
451 | } | 455 | // return true; |
456 | // } | ||
452 | 457 | ||
453 | private void AddHyperlinkRegion(GridRegion regionInfo, ulong regionHandle) | 458 | private void AddHyperlinkRegion(GridRegion regionInfo, ulong regionHandle) |
454 | { | 459 | { |
455 | |||
456 | RegionData rdata = m_GridService.RegionInfo2RegionData(regionInfo); | 460 | RegionData rdata = m_GridService.RegionInfo2RegionData(regionInfo); |
457 | int flags = (int)OpenSim.Data.RegionFlags.Hyperlink + (int)OpenSim.Data.RegionFlags.NoDirectLogin + (int)OpenSim.Data.RegionFlags.RegionOnline; | 461 | int flags = (int)OpenSim.Data.RegionFlags.Hyperlink + (int)OpenSim.Data.RegionFlags.NoDirectLogin + (int)OpenSim.Data.RegionFlags.RegionOnline; |
458 | rdata.Data["flags"] = flags.ToString(); | 462 | rdata.Data["flags"] = flags.ToString(); |
459 | 463 | ||
460 | m_Database.Store(rdata); | 464 | m_Database.Store(rdata); |
461 | |||
462 | } | 465 | } |
463 | 466 | ||
464 | private void RemoveHyperlinkRegion(UUID regionID) | 467 | private void RemoveHyperlinkRegion(UUID regionID) |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 5d1779a..2b15896 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -112,6 +112,14 @@ namespace OpenSim.Services.LLLoginService | |||
112 | m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty); | 112 | m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty); |
113 | m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty); | 113 | m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty); |
114 | 114 | ||
115 | // Clean up some of these vars | ||
116 | if (m_MapTileURL != String.Empty) | ||
117 | { | ||
118 | m_MapTileURL = m_MapTileURL.Trim(); | ||
119 | if (!m_MapTileURL.EndsWith("/")) | ||
120 | m_MapTileURL = m_MapTileURL + "/"; | ||
121 | } | ||
122 | |||
115 | // These are required; the others aren't | 123 | // These are required; the others aren't |
116 | if (accountService == string.Empty || authService == string.Empty) | 124 | if (accountService == string.Empty || authService == string.Empty) |
117 | throw new Exception("LoginService is missing service specifications"); | 125 | throw new Exception("LoginService is missing service specifications"); |
diff --git a/OpenSim/Services/MapImageService/MapImageService.cs b/OpenSim/Services/MapImageService/MapImageService.cs index 736fa2e..7e7391c 100644 --- a/OpenSim/Services/MapImageService/MapImageService.cs +++ b/OpenSim/Services/MapImageService/MapImageService.cs | |||
@@ -23,6 +23,10 @@ | |||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | ||
27 | * The design of this map service is based on SimianGrid's PHP-based | ||
28 | * map service. See this URL for the original PHP version: | ||
29 | * https://github.com/openmetaversefoundation/simiangrid/ | ||
26 | */ | 30 | */ |
27 | 31 | ||
28 | using System; | 32 | using System; |
@@ -139,7 +143,7 @@ namespace OpenSim.Services.MapImageService | |||
139 | if (File.Exists(fullName)) | 143 | if (File.Exists(fullName)) |
140 | { | 144 | { |
141 | format = Path.GetExtension(fileName).ToLower(); | 145 | format = Path.GetExtension(fileName).ToLower(); |
142 | m_log.DebugFormat("[MAP IMAGE SERVICE]: Found file {0}, extension {1}", fileName, format); | 146 | //m_log.DebugFormat("[MAP IMAGE SERVICE]: Found file {0}, extension {1}", fileName, format); |
143 | return File.ReadAllBytes(fullName); | 147 | return File.ReadAllBytes(fullName); |
144 | } | 148 | } |
145 | else if (File.Exists(m_WaterTileFile)) | 149 | else if (File.Exists(m_WaterTileFile)) |
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 813c5b8..bab118f 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -307,6 +307,14 @@ | |||
307 | ; serving this cap from the simulators may lead to poor performace. | 307 | ; serving this cap from the simulators may lead to poor performace. |
308 | Cap_WebFetchInventoryDescendents = "" | 308 | Cap_WebFetchInventoryDescendents = "" |
309 | 309 | ||
310 | [SimulatorFeatures] | ||
311 | ; Experimental new information sent in SimulatorFeatures cap for Kokua viewers | ||
312 | ; meant to override the MapImage and search server url given at login, and varying | ||
313 | ; on a sim-basis. | ||
314 | ; Viewers that don't understand it, will ignore it | ||
315 | ;MapImageServerURI = "http://127.0.0.1:9000/ | ||
316 | ;SearchServerURI = "http://127.0.0.1:9000/ | ||
317 | |||
310 | [Chat] | 318 | [Chat] |
311 | ;# {whisper_distance} {} {Distance at which a whisper is heard, in meters?} {} 10 | 319 | ;# {whisper_distance} {} {Distance at which a whisper is heard, in meters?} {} 10 |
312 | ;; Distance in meters that whispers should travel. | 320 | ;; Distance in meters that whispers should travel. |
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index fa5392d..7321cad 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini | |||
@@ -504,6 +504,10 @@ | |||
504 | ; Distance in meters that shouts should travel. Default is 100m | 504 | ; Distance in meters that shouts should travel. Default is 100m |
505 | shout_distance = 100 | 505 | shout_distance = 100 |
506 | 506 | ||
507 | [EntityTransfer] | ||
508 | ; The maximum distance in regions that an agent is allowed to teleport along the x or y axis | ||
509 | ; This is set to 4095 because current viewers can't handle teleports that are greater than this distance | ||
510 | max_distance = 4095 | ||
507 | 511 | ||
508 | [Messaging] | 512 | [Messaging] |
509 | ; Control which region module is used for instant messaging. | 513 | ; Control which region module is used for instant messaging. |
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index 812d265..ea271b8 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example | |||
@@ -21,7 +21,7 @@ | |||
21 | ; * [[<ConfigName>@]<port>/]<dll name>[:<class name>] | 21 | ; * [[<ConfigName>@]<port>/]<dll name>[:<class name>] |
22 | ; * | 22 | ; * |
23 | [Startup] | 23 | [Startup] |
24 | ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector,8002/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector,8002/OpenSim.Server.Handlers.dll:UserAgentServerConnector,HGInventoryService@8002/OpenSim.Server.Handlers.dll:XInventoryInConnector,HGAssetService@8002/OpenSim.Server.Handlers.dll:AssetServiceConnector,8002/OpenSim.Server.Handlers.dll:HeloServiceInConnector,8002/OpenSim.Server.Handlers.dll:HGFriendsServerConnector,8002/OpenSim.Server.Handlers.dll:InstantMessageServerConnector" | 24 | ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector,8002/OpenSim.Server.Handlers.dll:GatekeeperServiceInConnector,8002/OpenSim.Server.Handlers.dll:UserAgentServerConnector,HGInventoryService@8002/OpenSim.Server.Handlers.dll:XInventoryInConnector,HGAssetService@8002/OpenSim.Server.Handlers.dll:AssetServiceConnector,8002/OpenSim.Server.Handlers.dll:HeloServiceInConnector,8002/OpenSim.Server.Handlers.dll:HGFriendsServerConnector,8002/OpenSim.Server.Handlers.dll:InstantMessageServerConnector,8003/OpenSim.Server.Handlers.dll:MapAddServiceConnector,8002/OpenSim.Server.Handlers.dll:MapGetServiceConnector" |
25 | 25 | ||
26 | ; * This is common for all services, it's the network setup for the entire | 26 | ; * This is common for all services, it's the network setup for the entire |
27 | ; * server instance, if none is specified above | 27 | ; * server instance, if none is specified above |
@@ -206,6 +206,9 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 | |||
206 | WelcomeMessage = "Welcome, Avatar!" | 206 | WelcomeMessage = "Welcome, Avatar!" |
207 | AllowRemoteSetLoginLevel = "false" | 207 | AllowRemoteSetLoginLevel = "false" |
208 | 208 | ||
209 | ; For V2 map | ||
210 | ; MapTileURL = "http://127.0.0.1:8002"; | ||
211 | |||
209 | ; If you run this login server behind a proxy, set this to true | 212 | ; If you run this login server behind a proxy, set this to true |
210 | ; HasProxy = false | 213 | ; HasProxy = false |
211 | 214 | ||
@@ -237,6 +240,11 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 | |||
237 | ;AllowedClients = "" | 240 | ;AllowedClients = "" |
238 | ;DeniedClients = "" | 241 | ;DeniedClients = "" |
239 | 242 | ||
243 | [MapImageService] | ||
244 | LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService" | ||
245 | ; Set this if you want to change the default | ||
246 | ; TilesStoragePath = "maptiles" | ||
247 | |||
240 | [GridInfoService] | 248 | [GridInfoService] |
241 | ; These settings are used to return information on a get_grid_info call. | 249 | ; These settings are used to return information on a get_grid_info call. |
242 | ; Client launcher scripts and third-party clients make use of this to | 250 | ; Client launcher scripts and third-party clients make use of this to |
diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example index 5d0ec09..14f79aa 100644 --- a/bin/Robust.ini.example +++ b/bin/Robust.ini.example | |||
@@ -13,7 +13,7 @@ | |||
13 | ; * [[<ConfigName>@]<port>/]<dll name>[:<class name>] | 13 | ; * [[<ConfigName>@]<port>/]<dll name>[:<class name>] |
14 | ; * | 14 | ; * |
15 | [Startup] | 15 | [Startup] |
16 | ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector" | 16 | ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003/OpenSim.Server.Handlers.dll:XInventoryInConnector,8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector,8003/OpenSim.Server.Handlers.dll:GridServiceConnector,8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector,8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector,8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector,8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector,8002/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector,8003/OpenSim.Server.Handlers.dll:PresenceServiceConnector,8003/OpenSim.Server.Handlers.dll:UserAccountServiceConnector,8003/OpenSim.Server.Handlers.dll:GridUserServiceConnector,8003/OpenSim.Server.Handlers.dll:FriendsServiceConnector,8003/OpenSim.Server.Handlers.dll:MapAddServiceConnector,8002/OpenSim.Server.Handlers.dll:MapGetServiceConnector" |
17 | 17 | ||
18 | ; * This is common for all services, it's the network setup for the entire | 18 | ; * This is common for all services, it's the network setup for the entire |
19 | ; * server instance, if none is specified above | 19 | ; * server instance, if none is specified above |
@@ -191,8 +191,8 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 | |||
191 | WelcomeMessage = "Welcome, Avatar!" | 191 | WelcomeMessage = "Welcome, Avatar!" |
192 | AllowRemoteSetLoginLevel = "false" | 192 | AllowRemoteSetLoginLevel = "false" |
193 | 193 | ||
194 | ; For snowglobe's web map | 194 | ; For V2 map |
195 | ; MapTileURL = ""; | 195 | ; MapTileURL = "http://127.0.0.1:8002"; |
196 | 196 | ||
197 | ; If you run this login server behind a proxy, set this to true | 197 | ; If you run this login server behind a proxy, set this to true |
198 | ; HasProxy = false | 198 | ; HasProxy = false |
@@ -214,6 +214,12 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 | |||
214 | ;AllowedClients = "" | 214 | ;AllowedClients = "" |
215 | ;DeniedClients = "" | 215 | ;DeniedClients = "" |
216 | 216 | ||
217 | [MapImageService] | ||
218 | LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService" | ||
219 | ; Set this if you want to change the default | ||
220 | ; TilesStoragePath = "maptiles" | ||
221 | |||
222 | |||
217 | [GridInfoService] | 223 | [GridInfoService] |
218 | ; These settings are used to return information on a get_grid_info call. | 224 | ; These settings are used to return information on a get_grid_info call. |
219 | ; Client launcher scripts and third-party clients make use of this to | 225 | ; Client launcher scripts and third-party clients make use of this to |
diff --git a/bin/config-include/Grid.ini b/bin/config-include/Grid.ini index 5220573..da860c6 100644 --- a/bin/config-include/Grid.ini +++ b/bin/config-include/Grid.ini | |||
@@ -21,6 +21,7 @@ | |||
21 | EntityTransferModule = "BasicEntityTransferModule" | 21 | EntityTransferModule = "BasicEntityTransferModule" |
22 | InventoryAccessModule = "BasicInventoryAccessModule" | 22 | InventoryAccessModule = "BasicInventoryAccessModule" |
23 | LandServices = "RemoteLandServicesConnector" | 23 | LandServices = "RemoteLandServicesConnector" |
24 | MapImageService = "MapImageServiceModule" | ||
24 | 25 | ||
25 | LandServiceInConnector = true | 26 | LandServiceInConnector = true |
26 | NeighbourServiceInConnector = true | 27 | NeighbourServiceInConnector = true |
@@ -50,3 +51,8 @@ | |||
50 | 51 | ||
51 | [Friends] | 52 | [Friends] |
52 | Connector = "OpenSim.Services.Connectors.dll:FriendsServicesConnector" | 53 | Connector = "OpenSim.Services.Connectors.dll:FriendsServicesConnector" |
54 | |||
55 | [MapImageService] | ||
56 | LocalServiceModule = "OpenSim.Services.Connectors.dll:MapImageServicesConnector" | ||
57 | ; in minutes | ||
58 | RefreshTime = 60 | ||
diff --git a/bin/config-include/GridCommon.ini.example b/bin/config-include/GridCommon.ini.example index 27f262f..4eb6fcf 100644 --- a/bin/config-include/GridCommon.ini.example +++ b/bin/config-include/GridCommon.ini.example | |||
@@ -116,6 +116,9 @@ | |||
116 | ; | 116 | ; |
117 | UserAgentServerURI = "http://mygridserver.com:8002" | 117 | UserAgentServerURI = "http://mygridserver.com:8002" |
118 | 118 | ||
119 | [MapImageService] | ||
120 | MapImageServerURI = "http://mygridserver.com:8003" | ||
121 | |||
119 | [Modules] | 122 | [Modules] |
120 | ;; Choose 0 or 1 cache modules, and the corresponding config file, if it exists. | 123 | ;; Choose 0 or 1 cache modules, and the corresponding config file, if it exists. |
121 | ;; Copy the config .example file into your own .ini file and change configs there | 124 | ;; Copy the config .example file into your own .ini file and change configs there |
diff --git a/bin/config-include/GridHypergrid.ini b/bin/config-include/GridHypergrid.ini index b8e66c2..60a3c62 100644 --- a/bin/config-include/GridHypergrid.ini +++ b/bin/config-include/GridHypergrid.ini | |||
@@ -25,6 +25,7 @@ | |||
25 | InventoryAccessModule = "HGInventoryAccessModule" | 25 | InventoryAccessModule = "HGInventoryAccessModule" |
26 | LandServices = "RemoteLandServicesConnector" | 26 | LandServices = "RemoteLandServicesConnector" |
27 | FriendsModule = "HGFriendsModule" | 27 | FriendsModule = "HGFriendsModule" |
28 | MapImageService = "MapImageServiceModule" | ||
28 | 29 | ||
29 | LandServiceInConnector = true | 30 | LandServiceInConnector = true |
30 | NeighbourServiceInConnector = true | 31 | NeighbourServiceInConnector = true |
@@ -76,4 +77,9 @@ | |||
76 | LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInstantMessageService" | 77 | LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInstantMessageService" |
77 | GridService = "OpenSim.Services.Connectors.dll:GridServicesConnector" | 78 | GridService = "OpenSim.Services.Connectors.dll:GridServicesConnector" |
78 | PresenceService = "OpenSim.Services.Connectors.dll:PresenceServicesConnector" | 79 | PresenceService = "OpenSim.Services.Connectors.dll:PresenceServicesConnector" |
79 | UserAgentService = "OpenSim.Services.Connectors.dll:UserAgentServiceConnector" \ No newline at end of file | 80 | UserAgentService = "OpenSim.Services.Connectors.dll:UserAgentServiceConnector" |
81 | |||
82 | [MapImageService] | ||
83 | LocalServiceModule = "OpenSim.Services.Connectors.dll:MapImageServicesConnector" | ||
84 | ; in minutes | ||
85 | RefreshTime = 60 | ||
diff --git a/bin/config-include/StandaloneCommon.ini.example b/bin/config-include/StandaloneCommon.ini.example index 29c2af1..ee0523f 100644 --- a/bin/config-include/StandaloneCommon.ini.example +++ b/bin/config-include/StandaloneCommon.ini.example | |||
@@ -63,9 +63,6 @@ | |||
63 | ;;--- For MySql region storage (alternative) | 63 | ;;--- For MySql region storage (alternative) |
64 | ;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData" | 64 | ;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData" |
65 | 65 | ||
66 | ;; With hypergrid, perform distance check for the creation of a linked region | ||
67 | ; Check4096 = true | ||
68 | |||
69 | ;; Directory for map tile images of remote regions | 66 | ;; Directory for map tile images of remote regions |
70 | ; MapTileDirectory = "./maptiles" | 67 | ; MapTileDirectory = "./maptiles" |
71 | 68 | ||
@@ -223,3 +220,7 @@ | |||
223 | ; password help: optional: page providing password assistance for users of your grid | 220 | ; password help: optional: page providing password assistance for users of your grid |
224 | ; currently unused | 221 | ; currently unused |
225 | ;password = http://127.0.0.1/password | 222 | ;password = http://127.0.0.1/password |
223 | |||
224 | [MapImageService] | ||
225 | ; Set this if you want to change the default | ||
226 | ; TilesStoragePath = "maptiles" | ||