aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie2010-04-19 15:29:35 +0100
committerMelanie2010-04-19 15:29:35 +0100
commit3e63ce6d9d30a15addb7e31aa1c42df47c9dd8fd (patch)
tree7ff20f7f36d5aaa70ff82f838140b616de2cd9eb /OpenSim/Region/Framework
parentStopgap measure. Disable the recent script startup changes until I can cure the (diff)
downloadopensim-SC_OLD-3e63ce6d9d30a15addb7e31aa1c42df47c9dd8fd.zip
opensim-SC_OLD-3e63ce6d9d30a15addb7e31aa1c42df47c9dd8fd.tar.gz
opensim-SC_OLD-3e63ce6d9d30a15addb7e31aa1c42df47c9dd8fd.tar.bz2
opensim-SC_OLD-3e63ce6d9d30a15addb7e31aa1c42df47c9dd8fd.tar.xz
Make script asset fetches synchronous. Script instantiation synchronization
will not work if the instance is not created when the method returns.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs52
1 files changed, 24 insertions, 28 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 2b6be29..68f0122 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -282,36 +282,32 @@ namespace OpenSim.Region.Framework.Scenes
282 return; 282 return;
283 } 283 }
284 284
285 m_part.ParentGroup.Scene.AssetService.Get( 285 AssetBase asset = m_part.ParentGroup.Scene.AssetService.Get(item.AssetID.ToString());
286 item.AssetID.ToString(), this, delegate(string id, object sender, AssetBase asset) 286 if (null == asset)
287 { 287 {
288 if (null == asset) 288 m_log.ErrorFormat(
289 { 289 "[PRIM INVENTORY]: " +
290 m_log.ErrorFormat( 290 "Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found",
291 "[PRIM INVENTORY]: " + 291 item.Name, item.ItemID, m_part.AbsolutePosition,
292 "Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found", 292 m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID);
293 item.Name, item.ItemID, m_part.AbsolutePosition, 293 }
294 m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); 294 else
295 } 295 {
296 else 296 if (m_part.ParentGroup.m_savedScriptState != null)
297 { 297 RestoreSavedScriptState(item.OldItemID, item.ItemID);
298 if (m_part.ParentGroup.m_savedScriptState != null)
299 RestoreSavedScriptState(item.OldItemID, item.ItemID);
300 298
301 lock (m_items) 299 lock (m_items)
302 { 300 {
303 m_items[item.ItemID].PermsMask = 0; 301 m_items[item.ItemID].PermsMask = 0;
304 m_items[item.ItemID].PermsGranter = UUID.Zero; 302 m_items[item.ItemID].PermsGranter = UUID.Zero;
305 }
306
307 string script = Utils.BytesToString(asset.Data);
308 m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
309 m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
310 m_part.ParentGroup.AddActiveScriptCount(1);
311 m_part.ScheduleFullUpdate();
312 }
313 } 303 }
314 ); 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 }
315 } 311 }
316 } 312 }
317 313