aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2011-06-20 03:11:34 +0100
committerMelanie2011-06-20 03:11:34 +0100
commit6ae73aea496684cf3e72264c805216fcc7de66da (patch)
treeff42233fc49c9772aa945e062422645c8186ab7d /OpenSim/Region
parentMerge branch 'master' into careminster-presence-refactor (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-6ae73aea496684cf3e72264c805216fcc7de66da.zip
opensim-SC-6ae73aea496684cf3e72264c805216fcc7de66da.tar.gz
opensim-SC-6ae73aea496684cf3e72264c805216fcc7de66da.tar.bz2
opensim-SC-6ae73aea496684cf3e72264c805216fcc7de66da.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs152
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs7
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs137
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RemoteGridServiceConnector.cs34
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs14
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs3
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs7
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs15
9 files changed, 363 insertions, 10 deletions
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
28using System;
29using System.Collections;
30using System.Reflection;
31using log4net;
32using Nini.Config;
33using Mono.Addins;
34using OpenMetaverse;
35using OpenMetaverse.StructuredData;
36using OpenSim.Framework;
37using OpenSim.Framework.Servers.HttpServer;
38using OpenSim.Region.Framework.Interfaces;
39using OpenSim.Region.Framework.Scenes;
40using OpenSim.Services.Interfaces;
41using Caps = OpenSim.Framework.Capabilities.Caps;
42
43namespace 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 93657a8..63fde07 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -146,6 +146,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
146 146
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"))
150 m_log.InfoFormat(
151 "[INVENTORY ARCHIVER]: Saving item {0} {1} with asset {2}",
152 inventoryItem.ID, inventoryItem.Name, inventoryItem.AssetID);
153
149 string filename = path + CreateArchiveItemName(inventoryItem); 154 string filename = path + CreateArchiveItemName(inventoryItem);
150 155
151 // Record the creator of this item for user record purposes (which might go away soon) 156 // Record the creator of this item for user record purposes (which might go away soon)
@@ -441,4 +446,4 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
441 return s; 446 return s;
442 } 447 }
443 } 448 }
444} \ No newline at end of file 449}
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 */
27using System;
28using System.Reflection;
29using System.Collections.Generic;
30using OpenSim.Framework;
31using OpenSim.Services.Interfaces;
32using OpenMetaverse;
33using log4net;
34using GridRegion = OpenSim.Services.Interfaces.GridRegion;
35
36namespace 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 eb00de8..f8f3713 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/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 43dd835..e3744bd 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1643,7 +1643,6 @@ namespace OpenSim.Region.Framework.Scenes
1643 { 1643 {
1644 PhysActor.SOPName = this.Name; // save object name and desc into the PhysActor so ODE internals know the joint/body info 1644 PhysActor.SOPName = this.Name; // save object name and desc into the PhysActor so ODE internals know the joint/body info
1645 PhysActor.SOPDescription = this.Description; 1645 PhysActor.SOPDescription = this.Description;
1646 PhysActor.LocalID = LocalId;
1647 DoPhysicsPropertyUpdate(RigidBody, true); 1646 DoPhysicsPropertyUpdate(RigidBody, true);
1648 PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); 1647 PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0);
1649 } 1648 }
@@ -4435,6 +4434,7 @@ namespace OpenSim.Region.Framework.Scenes
4435 { 4434 {
4436 // It's not phantom anymore. So make sure the physics engine get's knowledge of it 4435 // It's not phantom anymore. So make sure the physics engine get's knowledge of it
4437 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 4436 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
4437 LocalId,
4438 string.Format("{0}/{1}", Name, UUID), 4438 string.Format("{0}/{1}", Name, UUID),
4439 Shape, 4439 Shape,
4440 AbsolutePosition, 4440 AbsolutePosition,
@@ -4446,7 +4446,6 @@ namespace OpenSim.Region.Framework.Scenes
4446 pa = PhysActor; 4446 pa = PhysActor;
4447 if (pa != null) 4447 if (pa != null)
4448 { 4448 {
4449 pa.LocalID = LocalId;
4450 DoPhysicsPropertyUpdate(UsePhysics, true); 4449 DoPhysicsPropertyUpdate(UsePhysics, true);
4451 if (m_parentGroup != null) 4450 if (m_parentGroup != null)
4452 { 4451 {
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; }