aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie2010-04-19 15:33:20 +0100
committerMelanie2010-04-19 15:33:20 +0100
commitd2e4f2d376ae8b2cfc904e304e590f1fd229c906 (patch)
treed86654b51d6d15fbc001b3fba6f1d576a5d6993a /OpenSim/Region/Framework
parentAnd some more rez modes that weren't covered before (diff)
parentMake script asset fetches synchronous. Script instantiation synchronization (diff)
downloadopensim-SC_OLD-d2e4f2d376ae8b2cfc904e304e590f1fd229c906.zip
opensim-SC_OLD-d2e4f2d376ae8b2cfc904e304e590f1fd229c906.tar.gz
opensim-SC_OLD-d2e4f2d376ae8b2cfc904e304e590f1fd229c906.tar.bz2
opensim-SC_OLD-d2e4f2d376ae8b2cfc904e304e590f1fd229c906.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs61
1 files changed, 29 insertions, 32 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 0404422..04df35a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -295,38 +295,35 @@ namespace OpenSim.Region.Framework.Scenes
295 return; 295 return;
296 } 296 }
297 297
298 m_part.ParentGroup.Scene.AssetService.Get(item.AssetID.ToString(), this, delegate(string id, object sender, AssetBase asset) 298 AssetBase asset = m_part.ParentGroup.Scene.AssetService.Get(item.AssetID.ToString());
299 { 299 if (null == asset)
300 if (null == asset) 300 {
301 { 301 string msg = String.Format("asset ID {0} could not be found", item.AssetID);
302 string msg = String.Format("asset ID {0} could not be found", item.AssetID); 302 StoreScriptError(item.ItemID, msg);
303 StoreScriptError(item.ItemID, msg); 303 m_log.ErrorFormat(
304 m_log.ErrorFormat( 304 "[PRIM INVENTORY]: " +
305 "[PRIM INVENTORY]: " + 305 "Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found",
306 "Couldn't start script {0}, {1} at {2} in {3} since {4}", 306 item.Name, item.ItemID, m_part.AbsolutePosition,
307 item.Name, item.ItemID, m_part.AbsolutePosition, 307 m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID);
308 m_part.ParentGroup.Scene.RegionInfo.RegionName, msg); 308 }
309 } 309 else
310 else 310 {
311 { 311 if (m_part.ParentGroup.m_savedScriptState != null)
312 if (m_part.ParentGroup.m_savedScriptState != null) 312 RestoreSavedScriptState(item.OldItemID, item.ItemID);
313 RestoreSavedScriptState(item.OldItemID, item.ItemID); 313
314 m_items.LockItemsForWrite(true); 314 lock (m_items)
315 m_items[item.ItemID].PermsMask = 0; 315 {
316 m_items[item.ItemID].PermsGranter = UUID.Zero; 316 m_items[item.ItemID].PermsMask = 0;
317 m_items.LockItemsForWrite(false); 317 m_items[item.ItemID].PermsGranter = UUID.Zero;
318 string script = Utils.BytesToString(asset.Data); 318 }
319 m_part.ParentGroup.Scene.EventManager.TriggerRezScript( 319
320 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource); 320 string script = Utils.BytesToString(asset.Data);
321 StoreScriptErrors(item.ItemID, null); 321 m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
322 m_part.ParentGroup.AddActiveScriptCount(1); 322 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
323 m_part.ScheduleFullUpdate(); 323 StoreScriptErrors(item.ItemID, null);
324 } 324 m_part.ParentGroup.AddActiveScriptCount(1);
325 }); 325 m_part.ScheduleFullUpdate();
326 } 326 }
327 else
328 {
329 StoreScriptError(item.ItemID, "scripts disabled");
330 } 327 }
331 } 328 }
332 329