aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-09-19 19:07:20 +0000
committerJustin Clarke Casey2008-09-19 19:07:20 +0000
commitfb5014cf5b9d7044aafcf7b11cbddb69a5119649 (patch)
tree06a8c1be6520db5fa801f5f7b638a5741691c156
parent* Remove one possible deadlock situation as seen today (diff)
downloadopensim-SC_OLD-fb5014cf5b9d7044aafcf7b11cbddb69a5119649.zip
opensim-SC_OLD-fb5014cf5b9d7044aafcf7b11cbddb69a5119649.tar.gz
opensim-SC_OLD-fb5014cf5b9d7044aafcf7b11cbddb69a5119649.tar.bz2
opensim-SC_OLD-fb5014cf5b9d7044aafcf7b11cbddb69a5119649.tar.xz
* Duh, forgot I had undone some of the changes I meant to include in the previous commit
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs17
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs4
2 files changed, 7 insertions, 14 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 506f0f5..80d7743 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -164,16 +164,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
164 set { m_StartParam = value; } 164 set { m_StartParam = value; }
165 } 165 }
166 166
167 public ScriptInstance(IScriptEngine engine, uint localID, 167 public ScriptInstance(IScriptEngine engine, SceneObjectPart part,
168 UUID objectID, UUID itemID, UUID assetID, string assembly, 168 UUID itemID, UUID assetID, string assembly,
169 AppDomain dom, string primName, string scriptName, 169 AppDomain dom, string primName, string scriptName,
170 int startParam, bool postOnRez, StateSource stateSource, 170 int startParam, bool postOnRez, StateSource stateSource,
171 int maxScriptQueue) 171 int maxScriptQueue)
172 { 172 {
173 m_Engine = engine; 173 m_Engine = engine;
174 174
175 m_LocalID = localID; 175 m_LocalID = part.LocalId;
176 m_ObjectID = objectID; 176 m_ObjectID = part.UUID;
177 m_ItemID = itemID; 177 m_ItemID = itemID;
178 m_AssetID = assetID; 178 m_AssetID = assetID;
179 m_PrimName = primName; 179 m_PrimName = primName;
@@ -184,17 +184,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
184 184
185 ApiManager am = new ApiManager(); 185 ApiManager am = new ApiManager();
186 186
187 SceneObjectPart part=engine.World.GetSceneObjectPart(localID);
188 if (part == null)
189 {
190 engine.Log.Error("[Script] SceneObjectPart unavailable. Script NOT started.");
191 return;
192 }
193
194 foreach (string api in am.GetApis()) 187 foreach (string api in am.GetApis())
195 { 188 {
196 m_Apis[api] = am.CreateApi(api); 189 m_Apis[api] = am.CreateApi(api);
197 m_Apis[api].Initialize(engine, part, localID, itemID); 190 m_Apis[api].Initialize(engine, part, m_LocalID, itemID);
198 } 191 }
199 192
200 try 193 try
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 7255de4..caaaf34 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -500,8 +500,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
500 m_DomainScripts[appDomain].Add(itemID); 500 m_DomainScripts[appDomain].Add(itemID);
501 501
502 ScriptInstance instance = 502 ScriptInstance instance =
503 new ScriptInstance(this, part.LocalId, 503 new ScriptInstance(this, part,
504 part.UUID, itemID, assetID, assembly, 504 itemID, assetID, assembly,
505 m_AppDomains[appDomain], 505 m_AppDomains[appDomain],
506 part.ParentGroup.RootPart.Name, 506 part.ParentGroup.RootPart.Name,
507 item.Name, startParam, postOnRez, 507 item.Name, startParam, postOnRez,