From 109aa00150aea01ba32620b4d965edd459827ff7 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Tue, 2 Sep 2008 12:07:23 +0000 Subject: fix: PostInitialise() not being called on script engines (nasty one that) cleanup: warnings, readability --- .../Modules/InterGrid/OpenGridProtocolModule.cs | 4 +- .../Scenes/SceneObjectPart.Inventory.cs | 46 +++++++++++----------- 2 files changed, 26 insertions(+), 24 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs index 90b7bcf..dbe045a 100644 --- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs @@ -123,10 +123,10 @@ namespace OpenSim.Region.Environment.Modules.InterGrid { try { -#pragma warning disable 0612 +#pragma warning disable 0612, 0618 // Mono does not implement the ServicePointManager.ServerCertificateValidationCallback yet! Don't remove this! ServicePointManager.CertificatePolicy = new MonoCert(); -#pragma warning restore 0612 +#pragma warning restore 0612, 0618 } catch (Exception) { diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index eb6b9cc..3bfe7e9 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs @@ -164,10 +164,11 @@ namespace OpenSim.Region.Environment.Scenes /// public void CreateScriptInstance(TaskInventoryItem item, int startParam, bool postOnRez) { - // m_log.InfoFormat( - // "[PRIM INVENTORY]: " + - // "Starting script {0}, {1} in prim {2}, {3}", - // item.Name, item.ItemID, Name, UUID); + // m_log.InfoFormat( + // "[PRIM INVENTORY]: " + + // "Starting script {0}, {1} in prim {2}, {3}", + // item.Name, item.ItemID, Name, UUID); + if (!m_parentGroup.Scene.ExternalChecks.ExternalChecksCanRunScript(item.ItemID, UUID, item.OwnerID)) return; @@ -178,24 +179,25 @@ namespace OpenSim.Region.Environment.Scenes AssetCache cache = m_parentGroup.Scene.AssetCache; cache.GetAsset(item.AssetID, delegate(LLUUID assetID, AssetBase asset) - { - if (null == asset) - { - m_log.ErrorFormat( - "[PRIM INVENTORY]: " + - "Couldn't start script {0}, {1} since asset ID {2} could not be found", - item.Name, item.ItemID, item.AssetID); - } - else - { - m_taskInventory[item.ItemID].PermsMask = 0; - m_taskInventory[item.ItemID].PermsGranter = LLUUID.Zero; - string script = Helpers.FieldToUTF8String(asset.Data); - m_parentGroup.Scene.EventManager.TriggerRezScript(LocalId, item.ItemID,script, startParam, postOnRez); - m_parentGroup.AddActiveScriptCount(1); - ScheduleFullUpdate(); - } - }, false); + { + if (null == asset) + { + m_log.ErrorFormat( + "[PRIM INVENTORY]: " + + "Couldn't start script {0}, {1} since asset ID {2} could not be found", + item.Name, item.ItemID, item.AssetID); + } + else + { + m_taskInventory[item.ItemID].PermsMask = 0; + m_taskInventory[item.ItemID].PermsGranter = LLUUID.Zero; + string script = Helpers.FieldToUTF8String(asset.Data); + m_parentGroup.Scene.EventManager.TriggerRezScript(LocalId, item.ItemID, script, + startParam, postOnRez); + m_parentGroup.AddActiveScriptCount(1); + ScheduleFullUpdate(); + } + }, false); } } -- cgit v1.1