diff options
author | UbitUmarov | 2018-02-07 19:52:18 +0000 |
---|---|---|
committer | UbitUmarov | 2018-02-07 19:52:18 +0000 |
commit | 01ceb4d17e80b794432062ff3bf3b85f884c9548 (patch) | |
tree | b74cb4ddb1dea21276991ae379e084708aa3fce2 /OpenSim/Region/ScriptEngine/XMREngine/XMRInstCtor.cs | |
parent | add a warning about XMR only suoprting one region per instance at this point,... (diff) | |
download | opensim-SC-01ceb4d17e80b794432062ff3bf3b85f884c9548.zip opensim-SC-01ceb4d17e80b794432062ff3bf3b85f884c9548.tar.gz opensim-SC-01ceb4d17e80b794432062ff3bf3b85f884c9548.tar.bz2 opensim-SC-01ceb4d17e80b794432062ff3bf3b85f884c9548.tar.xz |
try to fix xmr on multiregions per instance. Ugly spargetti ...; remove fixes for 2 llparcel functions that should not be needed; remove xmr own API, it has no business having one.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XMREngine/XMRInstCtor.cs | 82 |
1 files changed, 2 insertions, 80 deletions
diff --git a/OpenSim/Region/ScriptEngine/XMREngine/XMRInstCtor.cs b/OpenSim/Region/ScriptEngine/XMREngine/XMRInstCtor.cs index 1cf1ad1..7ae8c47 100644 --- a/OpenSim/Region/ScriptEngine/XMREngine/XMRInstCtor.cs +++ b/OpenSim/Region/ScriptEngine/XMREngine/XMRInstCtor.cs | |||
@@ -695,7 +695,7 @@ namespace OpenSim.Region.ScriptEngine.XMREngine | |||
695 | // do all the work in the MigrateInEventHandlerThread() method below | 695 | // do all the work in the MigrateInEventHandlerThread() method below |
696 | miehstream = stream; | 696 | miehstream = stream; |
697 | 697 | ||
698 | XMRScriptThread cst = XMRScriptThread.CurrentScriptThread (); | 698 | XMRScriptThread cst = m_Engine.CurrentScriptThread (); |
699 | if (cst != null) | 699 | if (cst != null) |
700 | { | 700 | { |
701 | // in case we are getting called inside some LSL Api function | 701 | // in case we are getting called inside some LSL Api function |
@@ -704,11 +704,7 @@ namespace OpenSim.Region.ScriptEngine.XMREngine | |||
704 | else | 704 | else |
705 | { | 705 | { |
706 | // some other thread, do migration via a script thread | 706 | // some other thread, do migration via a script thread |
707 | lock (XMRScriptThread.m_WakeUpLock) | 707 | m_Engine.QueueToTrunk(this.MigrateInEventHandlerThread); |
708 | { | ||
709 | m_Engine.m_ThunkQueue.Enqueue (this.MigrateInEventHandlerThread); | ||
710 | } | ||
711 | XMRScriptThread.WakeUpOne (); | ||
712 | 708 | ||
713 | // wait for it to complete | 709 | // wait for it to complete |
714 | lock (miehdone) | 710 | lock (miehdone) |
@@ -777,79 +773,5 @@ namespace OpenSim.Region.ScriptEngine.XMREngine | |||
777 | } | 773 | } |
778 | } | 774 | } |
779 | } | 775 | } |
780 | |||
781 | /** | ||
782 | * See if permitted by configuration file. | ||
783 | * See OSSL_Api.CheckThreatLevelTest(). | ||
784 | */ | ||
785 | public string CheckFetchbinaryAllowed () | ||
786 | { | ||
787 | string ownerPerm = m_Engine.Config.GetString ("Allow_fetchbinary", ""); | ||
788 | UUID ownerID = m_Item.OwnerID; | ||
789 | string[] ids = ownerPerm.Split (new char[] { ',' }); | ||
790 | foreach (string id in ids) | ||
791 | { | ||
792 | string curuc = id.Trim().ToUpperInvariant(); | ||
793 | |||
794 | switch (curuc) | ||
795 | { | ||
796 | case "ESTATE_MANAGER": | ||
797 | if (m_Engine.m_Scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner (ownerID) && | ||
798 | (m_Engine.m_Scene.RegionInfo.EstateSettings.EstateOwner != ownerID)) | ||
799 | return null; | ||
800 | |||
801 | break; | ||
802 | |||
803 | case "ESTATE_OWNER": | ||
804 | if (m_Engine.m_Scene.RegionInfo.EstateSettings.EstateOwner == ownerID) | ||
805 | return null; | ||
806 | |||
807 | break; | ||
808 | |||
809 | case "PARCEL_GROUP_MEMBER": | ||
810 | ILandObject land = m_Engine.m_Scene.LandChannel.GetLandObject (m_Part.AbsolutePosition); | ||
811 | if (land.LandData.GroupID == m_Item.GroupID && land.LandData.GroupID != UUID.Zero) | ||
812 | return null; | ||
813 | |||
814 | break; | ||
815 | |||
816 | case "PARCEL_OWNER": | ||
817 | ILandObject Oland = m_Engine.m_Scene.LandChannel.GetLandObject (m_Part.AbsolutePosition); | ||
818 | if (Oland.LandData.OwnerID == ownerID) | ||
819 | return null; | ||
820 | |||
821 | break; | ||
822 | |||
823 | case "TRUE": | ||
824 | return null; | ||
825 | |||
826 | default: | ||
827 | UUID uuid; | ||
828 | if (UUID.TryParse (curuc, out uuid)) | ||
829 | if (uuid == ownerID) return null; | ||
830 | |||
831 | break; | ||
832 | } | ||
833 | } | ||
834 | |||
835 | string creatorPerm = m_Engine.Config.GetString ("Creators_fetchbinary", ""); | ||
836 | UUID creatorID = m_Item.CreatorID; | ||
837 | ids = creatorPerm.Split (new char[] { ',' }); | ||
838 | foreach (string id in ids) | ||
839 | { | ||
840 | string current = id.Trim (); | ||
841 | UUID uuid; | ||
842 | if (UUID.TryParse (current, out uuid)) | ||
843 | { | ||
844 | if (uuid != UUID.Zero) | ||
845 | { | ||
846 | if (creatorID == uuid) | ||
847 | return null; | ||
848 | } | ||
849 | } | ||
850 | } | ||
851 | |||
852 | return "fetchbinary not enabled for owner " + ownerID + " creator " + creatorID; | ||
853 | } | ||
854 | } | 776 | } |
855 | } | 777 | } |