diff options
author | Diva Canto | 2010-03-31 21:30:44 -0700 |
---|---|---|
committer | Diva Canto | 2010-03-31 21:30:44 -0700 |
commit | 08ba34da0325e3ed2a839cff62f2020742e887e7 (patch) | |
tree | cb5fc3693b3b6a029c476a4e24f9cd2eae4ad53f /OpenSim | |
parent | Add missing licenses. Change relicensed LightShare module to proper BSD (diff) | |
download | opensim-SC_OLD-08ba34da0325e3ed2a839cff62f2020742e887e7.zip opensim-SC_OLD-08ba34da0325e3ed2a839cff62f2020742e887e7.tar.gz opensim-SC_OLD-08ba34da0325e3ed2a839cff62f2020742e887e7.tar.bz2 opensim-SC_OLD-08ba34da0325e3ed2a839cff62f2020742e887e7.tar.xz |
First attempt at fixing mantis #4641. It's better but there are now some issues with permissions.
(looks like my commit is going to touch CM files, I'm going to let it do it - eof only)
Diffstat (limited to 'OpenSim')
6 files changed, 38 insertions, 18 deletions
diff --git a/OpenSim/Framework/Communications/Osp/OspResolver.cs b/OpenSim/Framework/Communications/Osp/OspResolver.cs index 2e55f53..24ea64d 100644 --- a/OpenSim/Framework/Communications/Osp/OspResolver.cs +++ b/OpenSim/Framework/Communications/Osp/OspResolver.cs | |||
@@ -139,6 +139,9 @@ namespace OpenSim.Framework.Communications.Osp | |||
139 | /// </returns> | 139 | /// </returns> |
140 | protected static UUID ResolveOspaName(string name, IUserAccountService userService) | 140 | protected static UUID ResolveOspaName(string name, IUserAccountService userService) |
141 | { | 141 | { |
142 | if (userService == null) | ||
143 | return UUID.Zero; | ||
144 | |||
142 | int nameSeparatorIndex = name.IndexOf(OSPA_NAME_VALUE_SEPARATOR); | 145 | int nameSeparatorIndex = name.IndexOf(OSPA_NAME_VALUE_SEPARATOR); |
143 | 146 | ||
144 | if (nameSeparatorIndex < 0) | 147 | if (nameSeparatorIndex < 0) |
@@ -149,7 +152,7 @@ namespace OpenSim.Framework.Communications.Osp | |||
149 | 152 | ||
150 | string firstName = name.Remove(nameSeparatorIndex).TrimEnd(); | 153 | string firstName = name.Remove(nameSeparatorIndex).TrimEnd(); |
151 | string lastName = name.Substring(nameSeparatorIndex + 1).TrimStart(); | 154 | string lastName = name.Substring(nameSeparatorIndex + 1).TrimStart(); |
152 | 155 | ||
153 | UserAccount account = userService.GetUserAccount(UUID.Zero, firstName, lastName); | 156 | UserAccount account = userService.GetUserAccount(UUID.Zero, firstName, lastName); |
154 | if (account != null) | 157 | if (account != null) |
155 | return account.PrincipalID; | 158 | return account.PrincipalID; |
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 5eacd73..ad98816 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -38,7 +38,7 @@ using OpenSim.Framework.Console; | |||
38 | 38 | ||
39 | 39 | ||
40 | namespace OpenSim.Framework | 40 | namespace OpenSim.Framework |
41 | { | 41 | { |
42 | public class RegionLightShareData : ICloneable | 42 | public class RegionLightShareData : ICloneable |
43 | { | 43 | { |
44 | public UUID regionID = UUID.Zero; | 44 | public UUID regionID = UUID.Zero; |
@@ -86,11 +86,11 @@ namespace OpenSim.Framework | |||
86 | { | 86 | { |
87 | if (OnSave != null) | 87 | if (OnSave != null) |
88 | OnSave(this); | 88 | OnSave(this); |
89 | } | 89 | } |
90 | public object Clone() | 90 | public object Clone() |
91 | { | 91 | { |
92 | return this.MemberwiseClone(); // call clone method | 92 | return this.MemberwiseClone(); // call clone method |
93 | } | 93 | } |
94 | 94 | ||
95 | } | 95 | } |
96 | 96 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs index e37da9f..36dae6b 100644 --- a/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs +++ b/OpenSim/Region/CoreModules/Framework/Library/LibraryModule.cs | |||
@@ -173,11 +173,11 @@ namespace OpenSim.Region.CoreModules.Framework.Library | |||
173 | m_log.InfoFormat("[LIBRARY MODULE]: Loading library archive {0} ({1})...", iarFileName, simpleName); | 173 | m_log.InfoFormat("[LIBRARY MODULE]: Loading library archive {0} ({1})...", iarFileName, simpleName); |
174 | simpleName = GetInventoryPathFromName(simpleName); | 174 | simpleName = GetInventoryPathFromName(simpleName); |
175 | 175 | ||
176 | InventoryArchiveReadRequest archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, simpleName, iarFileName); | ||
176 | try | 177 | try |
177 | { | 178 | { |
178 | InventoryArchiveReadRequest archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, simpleName, iarFileName); | ||
179 | List<InventoryNodeBase> nodes = archread.Execute(); | 179 | List<InventoryNodeBase> nodes = archread.Execute(); |
180 | if (nodes.Count == 0) | 180 | if (nodes != null && nodes.Count == 0) |
181 | { | 181 | { |
182 | // didn't find the subfolder with the given name; place it on the top | 182 | // didn't find the subfolder with the given name; place it on the top |
183 | m_log.InfoFormat("[LIBRARY MODULE]: Didn't find {0} in library. Placing archive on the top level", simpleName); | 183 | m_log.InfoFormat("[LIBRARY MODULE]: Didn't find {0} in library. Placing archive on the top level", simpleName); |
@@ -185,16 +185,33 @@ namespace OpenSim.Region.CoreModules.Framework.Library | |||
185 | archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, "/", iarFileName); | 185 | archread = new InventoryArchiveReadRequest(m_MockScene, uinfo, "/", iarFileName); |
186 | archread.Execute(); | 186 | archread.Execute(); |
187 | } | 187 | } |
188 | archread.Close(); | 188 | foreach (InventoryNodeBase node in nodes) |
189 | FixPerms(node); | ||
189 | } | 190 | } |
190 | catch (Exception e) | 191 | catch (Exception e) |
191 | { | 192 | { |
192 | m_log.DebugFormat("[LIBRARY MODULE]: Exception when processing archive {0}: {1}", iarFileName, e.Message); | 193 | m_log.DebugFormat("[LIBRARY MODULE]: Exception when processing archive {0}: {1}", iarFileName, e.StackTrace); |
194 | } | ||
195 | finally | ||
196 | { | ||
197 | archread.Close(); | ||
193 | } | 198 | } |
194 | } | 199 | } |
195 | 200 | ||
196 | } | 201 | } |
197 | 202 | ||
203 | private void FixPerms(InventoryNodeBase node) | ||
204 | { | ||
205 | if (node is InventoryItemBase) | ||
206 | { | ||
207 | InventoryItemBase item = (InventoryItemBase)node; | ||
208 | item.BasePermissions = 0x7FFFFFFF; | ||
209 | item.EveryOnePermissions = 0x7FFFFFFF; | ||
210 | item.CurrentPermissions = 0x7FFFFFFF; | ||
211 | item.NextPermissions = 0x7FFFFFFF; | ||
212 | } | ||
213 | } | ||
214 | |||
198 | private void DumpLibrary() | 215 | private void DumpLibrary() |
199 | { | 216 | { |
200 | InventoryFolderImpl lib = m_Library.LibraryRootFolder; | 217 | InventoryFolderImpl lib = m_Library.LibraryRootFolder; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs index f5570ec..f13b6e5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ICM_Api.cs | |||
@@ -42,7 +42,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
42 | { | 42 | { |
43 | // Windlight Functions | 43 | // Windlight Functions |
44 | LSL_List cmGetWindlightScene(LSL_List rules); | 44 | LSL_List cmGetWindlightScene(LSL_List rules); |
45 | int cmSetWindlightScene(LSL_List rules); | 45 | int cmSetWindlightScene(LSL_List rules); |
46 | int cmSetWindlightSceneTargeted(LSL_List rules, key target); | 46 | int cmSetWindlightSceneTargeted(LSL_List rules, key target); |
47 | } | 47 | } |
48 | } | 48 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs index 522c020..f94ef4a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Constants.cs | |||
@@ -70,7 +70,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
70 | public const int WL_CLOUD_SCROLL_Y = 32; | 70 | public const int WL_CLOUD_SCROLL_Y = 32; |
71 | public const int WL_CLOUD_SCROLL_Y_LOCK = 33; | 71 | public const int WL_CLOUD_SCROLL_Y_LOCK = 33; |
72 | public const int WL_CLOUD_SCROLL_X_LOCK = 34; | 72 | public const int WL_CLOUD_SCROLL_X_LOCK = 34; |
73 | public const int WL_DRAW_CLASSIC_CLOUDS = 35; | 73 | public const int WL_DRAW_CLASSIC_CLOUDS = 35; |
74 | public const int WL_SUN_MOON_POSITION = 36; | 74 | public const int WL_SUN_MOON_POSITION = 36; |
75 | 75 | ||
76 | } | 76 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs index 5bc3a88..c0edaae 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/CM_Stub.cs | |||
@@ -66,11 +66,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
66 | public int cmSetWindlightScene(LSL_List rules) | 66 | public int cmSetWindlightScene(LSL_List rules) |
67 | { | 67 | { |
68 | return m_CM_Functions.cmSetWindlightScene(rules); | 68 | return m_CM_Functions.cmSetWindlightScene(rules); |
69 | } | 69 | } |
70 | 70 | ||
71 | public int cmSetWindlightSceneTargeted(LSL_List rules, key target) | 71 | public int cmSetWindlightSceneTargeted(LSL_List rules, key target) |
72 | { | 72 | { |
73 | return m_CM_Functions.cmSetWindlightSceneTargeted(rules, target); | 73 | return m_CM_Functions.cmSetWindlightSceneTargeted(rules, target); |
74 | } | 74 | } |
75 | } | 75 | } |
76 | } | 76 | } |