diff options
author | Justin Clark-Casey | 2014-11-11 17:28:41 +0000 |
---|---|---|
committer | Justin Clark-Casey | 2014-11-11 17:59:56 +0000 |
commit | 5aa8ba1b45c8a0a2965888287ba68e5773471db8 (patch) | |
tree | 43247203314bae5b3f75c3ba0d26a774c6b37129 /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-5aa8ba1b45c8a0a2965888287ba68e5773471db8.zip opensim-SC-5aa8ba1b45c8a0a2965888287ba68e5773471db8.tar.gz opensim-SC-5aa8ba1b45c8a0a2965888287ba68e5773471db8.tar.bz2 opensim-SC-5aa8ba1b45c8a0a2965888287ba68e5773471db8.tar.xz |
Fix issue where llRemoteLoadScriptPin() would treat 0 (the default) as a valid set pin in a destination prim rather than the unset no pin state
Adds regression test for this case.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 3c120ff..5cc5606 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1940,8 +1940,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1940 | /// Rez a script into a prim's inventory from another prim | 1940 | /// Rez a script into a prim's inventory from another prim |
1941 | /// </summary> | 1941 | /// </summary> |
1942 | /// <param name="remoteClient"></param> | 1942 | /// <param name="remoteClient"></param> |
1943 | /// <param name="itemID"> </param> | 1943 | /// <param name="srcPart"> </param> |
1944 | /// <param name="localID"></param> | 1944 | /// <param name="destId"> </param> |
1945 | /// <param name="pin"></param> | ||
1946 | /// <param name="running"></param> | ||
1947 | /// <param name="start_param"></param> | ||
1945 | public void RezScriptFromPrim(UUID srcId, SceneObjectPart srcPart, UUID destId, int pin, int running, int start_param) | 1948 | public void RezScriptFromPrim(UUID srcId, SceneObjectPart srcPart, UUID destId, int pin, int running, int start_param) |
1946 | { | 1949 | { |
1947 | TaskInventoryItem srcTaskItem = srcPart.Inventory.GetInventoryItem(srcId); | 1950 | TaskInventoryItem srcTaskItem = srcPart.Inventory.GetInventoryItem(srcId); |
@@ -1961,12 +1964,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1961 | if (destPart == null) | 1964 | if (destPart == null) |
1962 | { | 1965 | { |
1963 | m_log.ErrorFormat( | 1966 | m_log.ErrorFormat( |
1964 | "[PRIM INVENTORY]: " + | 1967 | "[PRIM INVENTORY]: Could not find part {0} to insert script item {1} from {2} {3} in {4}", |
1965 | "Could not find script for ID {0}", | 1968 | destId, srcId, srcPart.Name, srcPart.UUID, Name); |
1966 | destId); | ||
1967 | return; | 1969 | return; |
1968 | } | 1970 | } |
1969 | 1971 | ||
1970 | // Must own the object, and have modify rights | 1972 | // Must own the object, and have modify rights |
1971 | if (srcPart.OwnerID != destPart.OwnerID) | 1973 | if (srcPart.OwnerID != destPart.OwnerID) |
1972 | { | 1974 | { |
@@ -1974,12 +1976,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1974 | if ((destPart.GroupID == UUID.Zero) || (destPart.GroupID != srcPart.GroupID) || | 1976 | if ((destPart.GroupID == UUID.Zero) || (destPart.GroupID != srcPart.GroupID) || |
1975 | ((destPart.GroupMask & (uint)PermissionMask.Modify) == 0)) | 1977 | ((destPart.GroupMask & (uint)PermissionMask.Modify) == 0)) |
1976 | return; | 1978 | return; |
1977 | } else { | 1979 | } |
1980 | else | ||
1981 | { | ||
1978 | if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0) | 1982 | if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0) |
1979 | return; | 1983 | return; |
1980 | } | 1984 | } |
1981 | 1985 | ||
1982 | if (destPart.ScriptAccessPin != pin) | 1986 | if (destPart.ScriptAccessPin == 0 || destPart.ScriptAccessPin != pin) |
1983 | { | 1987 | { |
1984 | m_log.WarnFormat( | 1988 | m_log.WarnFormat( |
1985 | "[PRIM INVENTORY]: " + | 1989 | "[PRIM INVENTORY]: " + |