aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDiva Canto2010-06-25 05:15:54 -0700
committerDiva Canto2010-06-25 05:15:54 -0700
commit7488f612891e2bd34012ab181bedc832140a4d4d (patch)
tree5de32ecc585a8457af3a5dc89f1b010412196bb3 /OpenSim/Region
parentThis file wants to be committed. Line endings mess up. (diff)
parent* SimianAssetServiceConnector Delete() was expecting the wrong type of respon... (diff)
downloadopensim-SC_OLD-7488f612891e2bd34012ab181bedc832140a4d4d.zip
opensim-SC_OLD-7488f612891e2bd34012ab181bedc832140a4d4d.tar.gz
opensim-SC_OLD-7488f612891e2bd34012ab181bedc832140a4d4d.tar.bz2
opensim-SC_OLD-7488f612891e2bd34012ab181bedc832140a4d4d.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/Prioritizer.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs22
4 files changed, 30 insertions, 13 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 83be61e..f535fe8 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -367,13 +367,13 @@ namespace OpenSim
367 Environment.Exit(1); 367 Environment.Exit(1);
368 } 368 }
369 369
370 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
371 scene.EventManager.TriggerParcelPrimCountUpdate();
372
370 // We need to do this after we've initialized the 373 // We need to do this after we've initialized the
371 // scripting engines. 374 // scripting engines.
372 scene.CreateScriptInstances(); 375 scene.CreateScriptInstances();
373 376
374 scene.loadAllLandObjectsFromStorage(regionInfo.originRegionID);
375 scene.EventManager.TriggerParcelPrimCountUpdate();
376
377 m_sceneManager.Add(scene); 377 m_sceneManager.Add(scene);
378 378
379 if (m_autoCreateClientStack) 379 if (m_autoCreateClientStack)
diff --git a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
index f8e3d59..75efb79 100644
--- a/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Assets/GetTextureModule.cs
@@ -131,6 +131,12 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
131 131
132 if (texture != null) 132 if (texture != null)
133 { 133 {
134 if (texture.Type != (sbyte)AssetType.Texture)
135 {
136 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
137 httpResponse.Send();
138 return null;
139 }
134 SendTexture(httpRequest, httpResponse, texture); 140 SendTexture(httpRequest, httpResponse, texture);
135 } 141 }
136 else 142 else
@@ -147,6 +153,12 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
147 153
148 if (texture != null) 154 if (texture != null)
149 { 155 {
156 if (texture.Type != (sbyte)AssetType.Texture)
157 {
158 httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound;
159 httpResponse.Send();
160 return null;
161 }
150 SendTexture(httpRequest, httpResponse, texture); 162 SendTexture(httpRequest, httpResponse, texture);
151 } 163 }
152 else 164 else
diff --git a/OpenSim/Region/Framework/Scenes/Prioritizer.cs b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
index 7b7677b..de3c360 100644
--- a/OpenSim/Region/Framework/Scenes/Prioritizer.cs
+++ b/OpenSim/Region/Framework/Scenes/Prioritizer.cs
@@ -52,6 +52,9 @@ namespace OpenSim.Region.Framework.Scenes
52 public double GetUpdatePriority(IClientAPI client, ISceneEntity entity) 52 public double GetUpdatePriority(IClientAPI client, ISceneEntity entity)
53 { 53 {
54 double priority = 0; 54 double priority = 0;
55
56 if (entity == null)
57 return 100000;
55 58
56 switch (m_scene.UpdatePrioritizationScheme) 59 switch (m_scene.UpdatePrioritizationScheme)
57 { 60 {
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 866bb6e..3a8f168 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -31,6 +31,7 @@ using System.IO;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Collections; 32using System.Collections;
33using System.Reflection; 33using System.Reflection;
34using System.Threading;
34using OpenMetaverse; 35using OpenMetaverse;
35using log4net; 36using log4net;
36using OpenSim.Framework; 37using OpenSim.Framework;
@@ -200,6 +201,7 @@ namespace OpenSim.Region.Framework.Scenes
200 if ((int)InventoryType.LSL == item.InvType) 201 if ((int)InventoryType.LSL == item.InvType)
201 { 202 {
202 CreateScriptInstance(item, startParam, postOnRez, engine, stateSource); 203 CreateScriptInstance(item, startParam, postOnRez, engine, stateSource);
204 Thread.Sleep(10); // workaround for Mono cpu utilization > 100% bug
203 } 205 }
204 } 206 }
205 } 207 }
@@ -257,7 +259,7 @@ namespace OpenSim.Region.Framework.Scenes
257 // m_log.InfoFormat( 259 // m_log.InfoFormat(
258 // "[PRIM INVENTORY]: " + 260 // "[PRIM INVENTORY]: " +
259 // "Starting script {0}, {1} in prim {2}, {3}", 261 // "Starting script {0}, {1} in prim {2}, {3}",
260 // item.Name, item.ItemID, Name, UUID); 262 // item.Name, item.ItemID, m_part.Name, m_part.UUID);
261 263
262 if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID)) 264 if (!m_part.ParentGroup.Scene.Permissions.CanRunScript(item.ItemID, m_part.UUID, item.OwnerID))
263 return; 265 return;
@@ -293,20 +295,20 @@ namespace OpenSim.Region.Framework.Scenes
293 } 295 }
294 else 296 else
295 { 297 {
296 if (m_part.ParentGroup.m_savedScriptState != null)
297 RestoreSavedScriptState(item.OldItemID, item.ItemID);
298
299 lock (m_items) 298 lock (m_items)
300 { 299 {
300 if (m_part.ParentGroup.m_savedScriptState != null)
301 RestoreSavedScriptState(item.OldItemID, item.ItemID);
302
301 m_items[item.ItemID].PermsMask = 0; 303 m_items[item.ItemID].PermsMask = 0;
302 m_items[item.ItemID].PermsGranter = UUID.Zero; 304 m_items[item.ItemID].PermsGranter = UUID.Zero;
305
306 string script = Utils.BytesToString(asset.Data);
307 m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
308 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
309 m_part.ParentGroup.AddActiveScriptCount(1);
310 m_part.ScheduleFullUpdate();
303 } 311 }
304
305 string script = Utils.BytesToString(asset.Data);
306 m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
307 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
308 m_part.ParentGroup.AddActiveScriptCount(1);
309 m_part.ScheduleFullUpdate();
310 } 312 }
311 } 313 }
312 } 314 }