diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
25 files changed, 291 insertions, 644 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 9f52a14..39443c3 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -306,7 +306,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
306 | m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing any attachments for {0} from simulator-side", sp.Name); | 306 | m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing any attachments for {0} from simulator-side", sp.Name); |
307 | 307 | ||
308 | XmlDocument doc = new XmlDocument(); | 308 | XmlDocument doc = new XmlDocument(); |
309 | doc.XmlResolver=null; | ||
310 | string stateData = String.Empty; | 309 | string stateData = String.Empty; |
311 | 310 | ||
312 | IAttachmentsService attServ = m_scene.RequestModuleInterface<IAttachmentsService>(); | 311 | IAttachmentsService attServ = m_scene.RequestModuleInterface<IAttachmentsService>(); |
@@ -369,11 +368,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
369 | { | 368 | { |
370 | string xmlData; | 369 | string xmlData; |
371 | XmlDocument d = null; | 370 | XmlDocument d = null; |
372 | UUID asset; | 371 | |
373 | if (itemData.TryGetValue(attach.ItemID, out xmlData)) | 372 | if (itemData.TryGetValue(attach.ItemID, out xmlData)) |
374 | { | 373 | { |
375 | d = new XmlDocument(); | 374 | d = new XmlDocument(); |
376 | d.XmlResolver=null; | ||
377 | d.LoadXml(xmlData); | 375 | d.LoadXml(xmlData); |
378 | m_log.InfoFormat("[ATTACHMENT]: Found saved state for item {0}, loading it", attach.ItemID); | 376 | m_log.InfoFormat("[ATTACHMENT]: Found saved state for item {0}, loading it", attach.ItemID); |
379 | } | 377 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 4abac43..1a0b7ba 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -528,7 +528,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
528 | WearableCacheItem[] wearableCache = sp.Appearance.WearableCacheItems; | 528 | WearableCacheItem[] wearableCache = sp.Appearance.WearableCacheItems; |
529 | 529 | ||
530 | // big debug | 530 | // big debug |
531 | //m_log.DebugFormat("[AVFACTORY]: ValidateBakedTextureCache start for {0} {1}", sp.Name, sp.UUID); | 531 | // m_log.DebugFormat("[AVFACTORY]: ValidateBakedTextureCache start for {0} {1}", sp.Name, sp.UUID); |
532 | /* | 532 | /* |
533 | for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) | 533 | for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) |
534 | { | 534 | { |
@@ -601,7 +601,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
601 | wearableCacheValid = (wearableCacheValid && (hits >= AvatarAppearance.BAKE_INDICES.Length - 1)); | 601 | wearableCacheValid = (wearableCacheValid && (hits >= AvatarAppearance.BAKE_INDICES.Length - 1)); |
602 | if (wearableCacheValid) | 602 | if (wearableCacheValid) |
603 | { | 603 | { |
604 | //m_log.Debug("[ValidateBakedCache] have valid local cache"); | 604 | // m_log.Debug("[ValidateBakedCache] have valid local cache"); |
605 | } | 605 | } |
606 | else | 606 | else |
607 | wearableCache[19].TextureAsset = null; // clear optional skirt | 607 | wearableCache[19].TextureAsset = null; // clear optional skirt |
@@ -629,7 +629,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
629 | { | 629 | { |
630 | bool gotbacked = false; | 630 | bool gotbacked = false; |
631 | 631 | ||
632 | m_log.Debug("[ValidateBakedCache] local cache invalid, checking bakedModule"); | 632 | // m_log.Debug("[ValidateBakedCache] local cache invalid, checking bakedModule"); |
633 | try | 633 | try |
634 | { | 634 | { |
635 | bakedModuleCache = bakedModule.Get(sp.UUID); | 635 | bakedModuleCache = bakedModule.Get(sp.UUID); |
@@ -642,7 +642,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
642 | 642 | ||
643 | if (bakedModuleCache != null) | 643 | if (bakedModuleCache != null) |
644 | { | 644 | { |
645 | //m_log.Debug("[ValidateBakedCache] got bakedModule " + bakedModuleCache.Length + " cached textures"); | 645 | m_log.Debug("[ValidateBakedCache] got bakedModule " + bakedModuleCache.Length + " cached textures"); |
646 | 646 | ||
647 | for (int i = 0; i < bakedModuleCache.Length; i++) | 647 | for (int i = 0; i < bakedModuleCache.Length; i++) |
648 | { | 648 | { |
@@ -697,7 +697,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
697 | } | 697 | } |
698 | 698 | ||
699 | // debug | 699 | // debug |
700 | //m_log.DebugFormat("[ValidateBakedCache]: Completed texture check for {0} {1} with {2} hits", sp.Name, sp.UUID, hits); | 700 | // m_log.DebugFormat("[ValidateBakedCache]: Completed texture check for {0} {1} with {2} hits", sp.Name, sp.UUID, hits); |
701 | /* | 701 | /* |
702 | for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) | 702 | for (int iter = 0; iter < AvatarAppearance.BAKE_INDICES.Length; iter++) |
703 | { | 703 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs index 61e461a..cfa9581 100644 --- a/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/BakedTextures/XBakesModule.cs | |||
@@ -124,8 +124,6 @@ namespace OpenSim.Region.CoreModules.Avatar.BakedTextures | |||
124 | { | 124 | { |
125 | using(XmlTextReader sr = new XmlTextReader(s)) | 125 | using(XmlTextReader sr = new XmlTextReader(s)) |
126 | { | 126 | { |
127 | sr.ProhibitDtd = true; | ||
128 | |||
129 | sr.ReadStartElement("BakedAppearance"); | 127 | sr.ReadStartElement("BakedAppearance"); |
130 | while(sr.LocalName == "BakedTexture") | 128 | while(sr.LocalName == "BakedTexture") |
131 | { | 129 | { |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs index 2d57193..9cbfd4a 100644 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModule.cs | |||
@@ -27,86 +27,99 @@ | |||
27 | using System; | 27 | using System; |
28 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using System.Text; | ||
30 | using log4net; | 31 | using log4net; |
31 | using Nini.Config; | 32 | using Nini.Config; |
32 | using Mono.Addins; | ||
33 | using OpenMetaverse; | 33 | using OpenMetaverse; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Servers; | 35 | using OpenSim.Framework.Servers; |
36 | using OpenSim.Framework.Client; | 36 | using OpenSim.Framework.Client; |
37 | using OpenSim.Region.Framework.Interfaces; | 37 | using OpenSim.Region.Framework.Interfaces; |
38 | using OpenSim.Region.Framework.Scenes; | 38 | using OpenSim.Region.Framework.Scenes; |
39 | using Mono.Addins; | ||
40 | |||
41 | using OpenSim.Server.Base; | ||
42 | using OpenSim.Services.Interfaces; | ||
39 | 43 | ||
40 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | 44 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage |
41 | { | 45 | { |
42 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MuteListModule")] | 46 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MuteListModule")] |
43 | public class MuteListModule : ISharedRegionModule | 47 | public class MuteListModule : ISharedRegionModule |
44 | { | 48 | { |
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 49 | private static readonly ILog m_log = LogManager.GetLogger( |
50 | MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | 51 | ||
47 | private bool enabled = true; | 52 | protected bool m_Enabled = false; |
48 | private List<Scene> m_SceneList = new List<Scene>(); | 53 | protected List<Scene> m_SceneList = new List<Scene>(); |
49 | private string m_RestURL = String.Empty; | 54 | protected IMuteListService m_service = null; |
55 | private IUserManagement m_userManagementModule; | ||
50 | 56 | ||
51 | public void Initialise(IConfigSource config) | 57 | public void Initialise(IConfigSource config) |
52 | { | 58 | { |
53 | IConfig cnf = config.Configs["Messaging"]; | 59 | IConfig cnf = config.Configs["Messaging"]; |
54 | if (cnf == null) | 60 | if (cnf == null) |
55 | { | ||
56 | enabled = false; | ||
57 | return; | 61 | return; |
58 | } | ||
59 | 62 | ||
60 | if (cnf != null && cnf.GetString("MuteListModule", "None") != | 63 | if (cnf.GetString("MuteListModule", "None") != "MuteListModule") |
61 | "MuteListModule") | ||
62 | { | ||
63 | enabled = false; | ||
64 | return; | 64 | return; |
65 | } | ||
66 | 65 | ||
67 | m_RestURL = cnf.GetString("MuteListURL", ""); | 66 | m_Enabled = true; |
68 | if (m_RestURL == "") | ||
69 | { | ||
70 | m_log.Error("[MUTE LIST] Module was enabled, but no URL is given, disabling"); | ||
71 | enabled = false; | ||
72 | return; | ||
73 | } | ||
74 | } | 67 | } |
75 | 68 | ||
76 | public void AddRegion(Scene scene) | 69 | public void AddRegion(Scene scene) |
77 | { | 70 | { |
78 | if (!enabled) | 71 | } |
72 | |||
73 | public void RegionLoaded(Scene scene) | ||
74 | { | ||
75 | if (!m_Enabled) | ||
76 | return; | ||
77 | |||
78 | IXfer xfer = scene.RequestModuleInterface<IXfer>(); | ||
79 | if (xfer == null) | ||
80 | { | ||
81 | m_log.ErrorFormat("[MuteListModule]: Xfer not availble in region {0}. Module Disabled", scene.Name); | ||
82 | m_Enabled = false; | ||
83 | return; | ||
84 | } | ||
85 | |||
86 | IMuteListService srv = scene.RequestModuleInterface<IMuteListService>(); | ||
87 | if(srv == null) | ||
88 | { | ||
89 | m_log.ErrorFormat("[MuteListModule]: MuteListService not availble in region {0}. Module Disabled", scene.Name); | ||
90 | m_Enabled = false; | ||
79 | return; | 91 | return; |
92 | } | ||
80 | 93 | ||
81 | lock (m_SceneList) | 94 | lock (m_SceneList) |
82 | { | 95 | { |
96 | if(m_service == null) | ||
97 | m_service = srv; | ||
98 | if(m_userManagementModule == null) | ||
99 | m_userManagementModule = scene.RequestModuleInterface<IUserManagement>(); | ||
83 | m_SceneList.Add(scene); | 100 | m_SceneList.Add(scene); |
84 | |||
85 | scene.EventManager.OnNewClient += OnNewClient; | 101 | scene.EventManager.OnNewClient += OnNewClient; |
86 | } | 102 | } |
87 | } | 103 | } |
88 | 104 | ||
89 | public void RegionLoaded(Scene scene) | ||
90 | { | ||
91 | } | ||
92 | |||
93 | public void RemoveRegion(Scene scene) | 105 | public void RemoveRegion(Scene scene) |
94 | { | 106 | { |
95 | if (!enabled) | ||
96 | return; | ||
97 | |||
98 | lock (m_SceneList) | 107 | lock (m_SceneList) |
99 | { | 108 | { |
100 | m_SceneList.Remove(scene); | 109 | if(m_SceneList.Contains(scene)) |
110 | { | ||
111 | m_SceneList.Remove(scene); | ||
112 | scene.EventManager.OnNewClient -= OnNewClient; | ||
113 | } | ||
101 | } | 114 | } |
102 | } | 115 | } |
103 | 116 | ||
104 | public void PostInitialise() | 117 | public void PostInitialise() |
105 | { | 118 | { |
106 | if (!enabled) | 119 | if (!m_Enabled) |
107 | return; | 120 | return; |
108 | 121 | ||
109 | m_log.Debug("[MUTE LIST] Mute list enabled"); | 122 | m_log.Debug("[MuteListModule]: enabled"); |
110 | } | 123 | } |
111 | 124 | ||
112 | public string Name | 125 | public string Name |
@@ -118,27 +131,110 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | |||
118 | { | 131 | { |
119 | get { return null; } | 132 | get { return null; } |
120 | } | 133 | } |
121 | 134 | ||
122 | public void Close() | 135 | public void Close() |
123 | { | 136 | { |
124 | } | 137 | } |
125 | 138 | ||
139 | private bool IsForeign(IClientAPI client) | ||
140 | { | ||
141 | if(m_userManagementModule == null) | ||
142 | return false; // we can't check | ||
143 | |||
144 | return !m_userManagementModule.IsLocalGridUser(client.AgentId); | ||
145 | } | ||
146 | |||
126 | private void OnNewClient(IClientAPI client) | 147 | private void OnNewClient(IClientAPI client) |
127 | { | 148 | { |
128 | client.OnMuteListRequest += OnMuteListRequest; | 149 | client.OnMuteListRequest += OnMuteListRequest; |
150 | client.OnUpdateMuteListEntry += OnUpdateMuteListEntry; | ||
151 | client.OnRemoveMuteListEntry += OnRemoveMuteListEntry; | ||
129 | } | 152 | } |
130 | 153 | ||
131 | private void OnMuteListRequest(IClientAPI client, uint crc) | 154 | private void OnMuteListRequest(IClientAPI client, uint crc) |
132 | { | 155 | { |
133 | m_log.DebugFormat("[MUTE LIST] Got mute list request for crc {0}", crc); | 156 | if (!m_Enabled || IsForeign(client)) |
134 | string filename = "mutes"+client.AgentId.ToString(); | 157 | { |
158 | if(crc == 0) | ||
159 | client.SendEmpytMuteList(); | ||
160 | else | ||
161 | client.SendUseCachedMuteList(); | ||
162 | return; | ||
163 | } | ||
135 | 164 | ||
136 | IXfer xfer = client.Scene.RequestModuleInterface<IXfer>(); | 165 | IXfer xfer = client.Scene.RequestModuleInterface<IXfer>(); |
137 | if (xfer != null) | 166 | if (xfer == null) |
167 | { | ||
168 | if(crc == 0) | ||
169 | client.SendEmpytMuteList(); | ||
170 | else | ||
171 | client.SendUseCachedMuteList(); | ||
172 | return; | ||
173 | } | ||
174 | |||
175 | Byte[] data = m_service.MuteListRequest(client.AgentId, crc); | ||
176 | if (data == null) | ||
177 | { | ||
178 | if(crc == 0) | ||
179 | client.SendEmpytMuteList(); | ||
180 | else | ||
181 | client.SendUseCachedMuteList(); | ||
182 | return; | ||
183 | } | ||
184 | |||
185 | if (data.Length == 0) | ||
186 | { | ||
187 | client.SendEmpytMuteList(); | ||
188 | return; | ||
189 | } | ||
190 | |||
191 | if (data.Length == 1) | ||
192 | { | ||
193 | if(crc == 0) | ||
194 | client.SendEmpytMuteList(); | ||
195 | else | ||
196 | client.SendUseCachedMuteList(); | ||
197 | return; | ||
198 | } | ||
199 | |||
200 | string filename = "mutes" + client.AgentId.ToString(); | ||
201 | xfer.AddNewFile(filename, data); | ||
202 | client.SendMuteListUpdate(filename); | ||
203 | } | ||
204 | |||
205 | private void OnUpdateMuteListEntry(IClientAPI client, UUID muteID, string muteName, int muteType, uint muteFlags) | ||
206 | { | ||
207 | if (!m_Enabled || IsForeign(client)) | ||
208 | return; | ||
209 | |||
210 | UUID agentID = client.AgentId; | ||
211 | if(muteType == 1) // agent | ||
138 | { | 212 | { |
139 | xfer.AddNewFile(filename, new Byte[0]); | 213 | if(agentID == muteID) |
140 | client.SendMuteListUpdate(filename); | 214 | return; |
215 | if(m_SceneList[0].Permissions.IsAdministrator(muteID)) | ||
216 | { | ||
217 | OnMuteListRequest(client, 0); | ||
218 | return; | ||
219 | } | ||
141 | } | 220 | } |
221 | |||
222 | MuteData mute = new MuteData(); | ||
223 | mute.AgentID = agentID; | ||
224 | mute.MuteID = muteID; | ||
225 | mute.MuteName = muteName; | ||
226 | mute.MuteType = muteType; | ||
227 | mute.MuteFlags = (int)muteFlags; | ||
228 | mute.Stamp = Util.UnixTimeSinceEpoch(); | ||
229 | |||
230 | m_service.UpdateMute(mute); | ||
231 | } | ||
232 | |||
233 | private void OnRemoveMuteListEntry(IClientAPI client, UUID muteID, string muteName) | ||
234 | { | ||
235 | if (!m_Enabled || IsForeign(client)) | ||
236 | return; | ||
237 | m_service.RemoveMute(client.AgentId, muteID, muteName); | ||
142 | } | 238 | } |
143 | } | 239 | } |
144 | } | 240 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModuleTst.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModuleTst.cs deleted file mode 100644 index 6857f35..0000000 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/MuteListModuleTst.cs +++ /dev/null | |||
@@ -1,229 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | using System.Reflection; | ||
30 | using System.Text; | ||
31 | using log4net; | ||
32 | using Nini.Config; | ||
33 | using OpenMetaverse; | ||
34 | using OpenSim.Framework; | ||
35 | using OpenSim.Framework.Servers; | ||
36 | using OpenSim.Framework.Client; | ||
37 | using OpenSim.Region.Framework.Interfaces; | ||
38 | using OpenSim.Region.Framework.Scenes; | ||
39 | using Mono.Addins; | ||
40 | |||
41 | using OpenSim.Server.Base; | ||
42 | using OpenSim.Services.Interfaces; | ||
43 | |||
44 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | ||
45 | { | ||
46 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MuteListModuleTst")] | ||
47 | public class MuteListModuleTst : ISharedRegionModule | ||
48 | { | ||
49 | private static readonly ILog m_log = LogManager.GetLogger( | ||
50 | MethodBase.GetCurrentMethod().DeclaringType); | ||
51 | |||
52 | protected bool m_Enabled = false; | ||
53 | protected List<Scene> m_SceneList = new List<Scene>(); | ||
54 | protected IMuteListService m_service = null; | ||
55 | |||
56 | public void Initialise(IConfigSource config) | ||
57 | { | ||
58 | IConfig cnf = config.Configs["Messaging"]; | ||
59 | if (cnf == null) | ||
60 | return; | ||
61 | |||
62 | if (cnf.GetString("MuteListModule", "None") != "MuteListModuleTst") | ||
63 | return; | ||
64 | |||
65 | m_Enabled = true; | ||
66 | } | ||
67 | |||
68 | public void AddRegion(Scene scene) | ||
69 | { | ||
70 | } | ||
71 | |||
72 | public void RegionLoaded(Scene scene) | ||
73 | { | ||
74 | if (!m_Enabled) | ||
75 | return; | ||
76 | |||
77 | IXfer xfer = scene.RequestModuleInterface<IXfer>(); | ||
78 | if (xfer == null) | ||
79 | { | ||
80 | m_log.ErrorFormat("[MuteListModuleTst]: Xfer not availble in region {0}. Module Disabled", scene.Name); | ||
81 | m_Enabled = false; | ||
82 | return; | ||
83 | } | ||
84 | |||
85 | IMuteListService srv = scene.RequestModuleInterface<IMuteListService>(); | ||
86 | if(srv == null) | ||
87 | { | ||
88 | m_log.ErrorFormat("[MuteListModuleTst]: MuteListService not availble in region {0}. Module Disabled", scene.Name); | ||
89 | m_Enabled = false; | ||
90 | return; | ||
91 | } | ||
92 | lock (m_SceneList) | ||
93 | { | ||
94 | if(m_service == null) | ||
95 | m_service = srv; | ||
96 | m_SceneList.Add(scene); | ||
97 | scene.EventManager.OnNewClient += OnNewClient; | ||
98 | } | ||
99 | } | ||
100 | |||
101 | public void RemoveRegion(Scene scene) | ||
102 | { | ||
103 | lock (m_SceneList) | ||
104 | { | ||
105 | if(m_SceneList.Contains(scene)) | ||
106 | { | ||
107 | m_SceneList.Remove(scene); | ||
108 | scene.EventManager.OnNewClient -= OnNewClient; | ||
109 | } | ||
110 | } | ||
111 | } | ||
112 | |||
113 | public void PostInitialise() | ||
114 | { | ||
115 | if (!m_Enabled) | ||
116 | return; | ||
117 | |||
118 | m_log.Debug("[MuteListModuleTst]: enabled"); | ||
119 | } | ||
120 | |||
121 | public string Name | ||
122 | { | ||
123 | get { return "MuteListModuleTst"; } | ||
124 | } | ||
125 | |||
126 | public Type ReplaceableInterface | ||
127 | { | ||
128 | get { return null; } | ||
129 | } | ||
130 | |||
131 | public void Close() | ||
132 | { | ||
133 | } | ||
134 | |||
135 | private void OnNewClient(IClientAPI client) | ||
136 | { | ||
137 | client.OnMuteListRequest += OnMuteListRequest; | ||
138 | client.OnUpdateMuteListEntry += OnUpdateMuteListEntry; | ||
139 | client.OnRemoveMuteListEntry += OnRemoveMuteListEntry; | ||
140 | } | ||
141 | |||
142 | private void OnMuteListRequest(IClientAPI client, uint crc) | ||
143 | { | ||
144 | if (!m_Enabled) | ||
145 | { | ||
146 | if(crc == 0) | ||
147 | client.SendEmpytMuteList(); | ||
148 | else | ||
149 | client.SendUseCachedMuteList(); | ||
150 | return; | ||
151 | } | ||
152 | |||
153 | IXfer xfer = client.Scene.RequestModuleInterface<IXfer>(); | ||
154 | if (xfer == null) | ||
155 | { | ||
156 | if(crc == 0) | ||
157 | client.SendEmpytMuteList(); | ||
158 | else | ||
159 | client.SendUseCachedMuteList(); | ||
160 | return; | ||
161 | } | ||
162 | |||
163 | Byte[] data = m_service.MuteListRequest(client.AgentId, crc); | ||
164 | if (data == null) | ||
165 | { | ||
166 | if(crc == 0) | ||
167 | client.SendEmpytMuteList(); | ||
168 | else | ||
169 | client.SendUseCachedMuteList(); | ||
170 | return; | ||
171 | } | ||
172 | |||
173 | if (data.Length == 0) | ||
174 | { | ||
175 | client.SendEmpytMuteList(); | ||
176 | return; | ||
177 | } | ||
178 | |||
179 | if (data.Length == 1) | ||
180 | { | ||
181 | if(crc == 0) | ||
182 | client.SendEmpytMuteList(); | ||
183 | else | ||
184 | client.SendUseCachedMuteList(); | ||
185 | return; | ||
186 | } | ||
187 | |||
188 | string filename = "mutes" + client.AgentId.ToString(); | ||
189 | xfer.AddNewFile(filename, data); | ||
190 | client.SendMuteListUpdate(filename); | ||
191 | } | ||
192 | |||
193 | private void OnUpdateMuteListEntry(IClientAPI client, UUID muteID, string muteName, int muteType, uint muteFlags) | ||
194 | { | ||
195 | if (!m_Enabled) | ||
196 | return; | ||
197 | |||
198 | UUID agentID = client.AgentId; | ||
199 | if(muteType == 1) // agent | ||
200 | { | ||
201 | if(agentID == muteID) | ||
202 | return; | ||
203 | if(m_SceneList[0].Permissions.IsAdministrator(muteID)) | ||
204 | { | ||
205 | OnMuteListRequest(client, 0); | ||
206 | return; | ||
207 | } | ||
208 | } | ||
209 | |||
210 | MuteData mute = new MuteData(); | ||
211 | mute.AgentID = agentID; | ||
212 | mute.MuteID = muteID; | ||
213 | mute.MuteName = muteName; | ||
214 | mute.MuteType = muteType; | ||
215 | mute.MuteFlags = (int)muteFlags; | ||
216 | mute.Stamp = Util.UnixTimeSinceEpoch(); | ||
217 | |||
218 | m_service.UpdateMute(mute); | ||
219 | } | ||
220 | |||
221 | private void OnRemoveMuteListEntry(IClientAPI client, UUID muteID, string muteName) | ||
222 | { | ||
223 | if (!m_Enabled) | ||
224 | return; | ||
225 | m_service.RemoveMute(client.AgentId, muteID, muteName); | ||
226 | } | ||
227 | } | ||
228 | } | ||
229 | |||
diff --git a/OpenSim/Region/CoreModules/Avatar/InstantMessage/XMuteModule.cs b/OpenSim/Region/CoreModules/Avatar/InstantMessage/XMuteModule.cs deleted file mode 100644 index b61e848..0000000 --- a/OpenSim/Region/CoreModules/Avatar/InstantMessage/XMuteModule.cs +++ /dev/null | |||
@@ -1,239 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | using System.Reflection; | ||
30 | using System.Text; | ||
31 | using log4net; | ||
32 | using Nini.Config; | ||
33 | using OpenMetaverse; | ||
34 | using OpenSim.Framework; | ||
35 | using OpenSim.Region.Framework.Interfaces; | ||
36 | using OpenSim.Region.Framework.Scenes; | ||
37 | using Mono.Addins; | ||
38 | using OpenSim.Data.MySQL; | ||
39 | using MySql.Data.MySqlClient; | ||
40 | |||
41 | |||
42 | namespace OpenSim.Region.CoreModules.Avatar.InstantMessage | ||
43 | { | ||
44 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "XMute")] | ||
45 | public class XMuteModule : ISharedRegionModule | ||
46 | { | ||
47 | private static readonly ILog m_log = LogManager.GetLogger( | ||
48 | MethodBase.GetCurrentMethod().DeclaringType); | ||
49 | |||
50 | protected bool m_Enabled = true; | ||
51 | protected List<Scene> m_SceneList = new List<Scene>(); | ||
52 | protected MuteTableHandler m_MuteTable; | ||
53 | protected string m_DatabaseConnect; | ||
54 | |||
55 | public void Initialise(IConfigSource config) | ||
56 | { | ||
57 | IConfig cnf = config.Configs["Messaging"]; | ||
58 | if (cnf == null) | ||
59 | { | ||
60 | m_Enabled = false; | ||
61 | return; | ||
62 | } | ||
63 | |||
64 | if (cnf.GetString("MuteListModule", "None") != | ||
65 | "XMute") | ||
66 | { | ||
67 | m_Enabled = false; | ||
68 | return; | ||
69 | } | ||
70 | |||
71 | m_DatabaseConnect = cnf.GetString("MuteDatabaseConnect", String.Empty); | ||
72 | if (m_DatabaseConnect == String.Empty) | ||
73 | { | ||
74 | m_log.Debug("[XMute]: MuteDatabaseConnect missing or empty"); | ||
75 | m_Enabled = false; | ||
76 | return; | ||
77 | } | ||
78 | |||
79 | m_MuteTable = new MuteTableHandler( | ||
80 | m_DatabaseConnect, "XMute", String.Empty); | ||
81 | } | ||
82 | |||
83 | public void AddRegion(Scene scene) | ||
84 | { | ||
85 | if (!m_Enabled) | ||
86 | return; | ||
87 | |||
88 | lock (m_SceneList) | ||
89 | { | ||
90 | m_SceneList.Add(scene); | ||
91 | |||
92 | scene.EventManager.OnNewClient += OnNewClient; | ||
93 | } | ||
94 | } | ||
95 | |||
96 | public void RegionLoaded(Scene scene) | ||
97 | { | ||
98 | } | ||
99 | |||
100 | public void RemoveRegion(Scene scene) | ||
101 | { | ||
102 | if (!m_Enabled) | ||
103 | return; | ||
104 | |||
105 | lock (m_SceneList) | ||
106 | { | ||
107 | m_SceneList.Remove(scene); | ||
108 | } | ||
109 | } | ||
110 | |||
111 | public void PostInitialise() | ||
112 | { | ||
113 | if (!m_Enabled) | ||
114 | return; | ||
115 | |||
116 | m_log.Debug("[XMute]: Mute list enabled"); | ||
117 | } | ||
118 | |||
119 | public string Name | ||
120 | { | ||
121 | get { return "XMuteModule"; } | ||
122 | } | ||
123 | |||
124 | public Type ReplaceableInterface | ||
125 | { | ||
126 | get { return null; } | ||
127 | } | ||
128 | |||
129 | public void Close() | ||
130 | { | ||
131 | } | ||
132 | |||
133 | private void OnNewClient(IClientAPI client) | ||
134 | { | ||
135 | client.OnMuteListRequest += OnMuteListRequest; | ||
136 | client.OnUpdateMuteListEntry += OnUpdateMuteListEntry; | ||
137 | client.OnRemoveMuteListEntry += OnRemoveMuteListEntry; | ||
138 | } | ||
139 | |||
140 | private void OnMuteListRequest(IClientAPI client, uint crc) | ||
141 | { | ||
142 | string filename = "mutes"+client.AgentId.ToString(); | ||
143 | |||
144 | IXfer xfer = client.Scene.RequestModuleInterface<IXfer>(); | ||
145 | if (xfer != null) | ||
146 | { | ||
147 | MuteData[] data = m_MuteTable.Get("AgentID", client.AgentId.ToString()); | ||
148 | if (data == null || data.Length == 0) | ||
149 | { | ||
150 | xfer.AddNewFile(filename, new Byte[0]); | ||
151 | } | ||
152 | else | ||
153 | { | ||
154 | StringBuilder sb = new StringBuilder(1024); | ||
155 | |||
156 | foreach (MuteData d in data) | ||
157 | sb.AppendFormat("{0} {1} {2}|{3}\n", | ||
158 | d.MuteType, | ||
159 | d.MuteID.ToString(), | ||
160 | d.MuteName, | ||
161 | d.MuteFlags); | ||
162 | |||
163 | Byte[] filedata = Util.UTF8.GetBytes(sb.ToString()); | ||
164 | |||
165 | uint dataCrc = Crc32.Compute(filedata); | ||
166 | |||
167 | if (dataCrc == crc) | ||
168 | { | ||
169 | client.SendUseCachedMuteList(); | ||
170 | return; | ||
171 | } | ||
172 | |||
173 | xfer.AddNewFile(filename, filedata); | ||
174 | } | ||
175 | |||
176 | client.SendMuteListUpdate(filename); | ||
177 | } | ||
178 | } | ||
179 | |||
180 | private void OnUpdateMuteListEntry(IClientAPI client, UUID muteID, string muteName, int muteType, uint muteFlags) | ||
181 | { | ||
182 | MuteData mute = new MuteData(); | ||
183 | |||
184 | mute.AgentID = client.AgentId; | ||
185 | mute.MuteID = muteID; | ||
186 | mute.MuteName = muteName; | ||
187 | mute.MuteType = muteType; | ||
188 | mute.MuteFlags = (int)muteFlags; | ||
189 | mute.Stamp = Util.UnixTimeSinceEpoch(); | ||
190 | |||
191 | m_MuteTable.Store(mute); | ||
192 | } | ||
193 | |||
194 | private void OnRemoveMuteListEntry(IClientAPI client, UUID muteID, string muteName) | ||
195 | { | ||
196 | m_MuteTable.Delete(new string[] { "AgentID", | ||
197 | "MuteID", | ||
198 | "MuteName" }, | ||
199 | new string[] { client.AgentId.ToString(), | ||
200 | muteID.ToString(), | ||
201 | muteName }); | ||
202 | } | ||
203 | } | ||
204 | |||
205 | public class MuteTableHandler : MySQLGenericTableHandler<MuteData> | ||
206 | { | ||
207 | public MuteTableHandler(string conn, string realm, string m) : base(conn, realm, m) | ||
208 | { | ||
209 | } | ||
210 | |||
211 | public bool Delete(string[] fields, string[] val) | ||
212 | { | ||
213 | if (fields.Length != val.Length) | ||
214 | return false; | ||
215 | |||
216 | using (MySqlCommand cmd = new MySqlCommand()) | ||
217 | { | ||
218 | string text = String.Format("delete from {0} where ", m_Realm); | ||
219 | |||
220 | List<string> terms = new List<string>(); | ||
221 | |||
222 | for (int i = 0 ; i < fields.Length ; i++) | ||
223 | { | ||
224 | terms.Add(String.Format("{0} = ?{0}", fields[i])); | ||
225 | cmd.Parameters.AddWithValue("?" + fields[i], val[i]); | ||
226 | } | ||
227 | |||
228 | text += string.Join(" and ", terms.ToArray()); | ||
229 | |||
230 | cmd.CommandText = text; | ||
231 | |||
232 | if (ExecuteNonQuery(cmd) > 0) | ||
233 | return true; | ||
234 | return false; | ||
235 | } | ||
236 | } | ||
237 | } | ||
238 | } | ||
239 | |||
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index e02ca49..22984ef 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs | |||
@@ -71,6 +71,9 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
71 | ExpiringCache<UUID, UserProfileCacheEntry> m_profilesCache = new ExpiringCache<UUID, UserProfileCacheEntry>(); | 71 | ExpiringCache<UUID, UserProfileCacheEntry> m_profilesCache = new ExpiringCache<UUID, UserProfileCacheEntry>(); |
72 | IAssetCache m_assetCache; | 72 | IAssetCache m_assetCache; |
73 | 73 | ||
74 | static readonly UUID m_MrOpenSimID = new UUID("11111111-1111-0000-0000-000100bba000"); | ||
75 | static readonly DateTime m_MrOpenSimBorn = new DateTime(2007,1,1,0,0,0,DateTimeKind.Utc); | ||
76 | |||
74 | private JsonRpcRequestManager rpc = new JsonRpcRequestManager(); | 77 | private JsonRpcRequestManager rpc = new JsonRpcRequestManager(); |
75 | private bool m_allowUserProfileWebURLs = true; | 78 | private bool m_allowUserProfileWebURLs = true; |
76 | 79 | ||
@@ -355,6 +358,12 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
355 | if(!UUID.TryParse(args[0], out targetID) || targetID == UUID.Zero) | 358 | if(!UUID.TryParse(args[0], out targetID) || targetID == UUID.Zero) |
356 | return; | 359 | return; |
357 | 360 | ||
361 | if (targetID == m_MrOpenSimID) | ||
362 | { | ||
363 | remoteClient.SendAvatarClassifiedReply(targetID, classifieds); | ||
364 | return; | ||
365 | } | ||
366 | |||
358 | ScenePresence p = FindPresence(targetID); | 367 | ScenePresence p = FindPresence(targetID); |
359 | if (p != null && p.IsNPC) | 368 | if (p != null && p.IsNPC) |
360 | { | 369 | { |
@@ -750,6 +759,12 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
750 | 759 | ||
751 | Dictionary<UUID, string> picks = new Dictionary<UUID, string>(); | 760 | Dictionary<UUID, string> picks = new Dictionary<UUID, string>(); |
752 | 761 | ||
762 | if (targetId == m_MrOpenSimID) | ||
763 | { | ||
764 | remoteClient.SendAvatarPicksReply(targetId, picks); | ||
765 | return; | ||
766 | } | ||
767 | |||
753 | ScenePresence p = FindPresence(targetId); | 768 | ScenePresence p = FindPresence(targetId); |
754 | if (p != null && p.IsNPC) | 769 | if (p != null && p.IsNPC) |
755 | { | 770 | { |
@@ -1164,6 +1179,9 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
1164 | /// </param> | 1179 | /// </param> |
1165 | public void NotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes) | 1180 | public void NotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes) |
1166 | { | 1181 | { |
1182 | if (queryTargetID == m_MrOpenSimID) | ||
1183 | return; | ||
1184 | |||
1167 | ScenePresence p = FindPresence(queryTargetID); | 1185 | ScenePresence p = FindPresence(queryTargetID); |
1168 | if (p != null && p.IsNPC) | 1186 | if (p != null && p.IsNPC) |
1169 | { | 1187 | { |
@@ -1328,6 +1346,15 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles | |||
1328 | return; | 1346 | return; |
1329 | } | 1347 | } |
1330 | 1348 | ||
1349 | if (avatarID == m_MrOpenSimID) | ||
1350 | { | ||
1351 | remoteClient.SendAvatarProperties(avatarID, "Creator of OpenSimulator shared assets library", m_MrOpenSimBorn.ToString(), | ||
1352 | Utils.StringToBytes("System agent"), "MrOpenSim has no life", 0x10, | ||
1353 | UUID.Zero, UUID.Zero, "", UUID.Zero); | ||
1354 | remoteClient.SendAvatarInterestsReply(avatarID, 0, "", | ||
1355 | 0, "Getting into trouble", "Droidspeak"); | ||
1356 | return; | ||
1357 | } | ||
1331 | ScenePresence p = FindPresence(avatarID); | 1358 | ScenePresence p = FindPresence(avatarID); |
1332 | if (p != null && p.IsNPC) | 1359 | if (p != null && p.IsNPC) |
1333 | { | 1360 | { |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs index 01c5d3b..8f12331 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/Tests/HGAssetMapperTests.cs | |||
@@ -93,7 +93,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess.Tests | |||
93 | Assert.AreEqual(foreignUrl, ncAssetGet.CreatorID); | 93 | Assert.AreEqual(foreignUrl, ncAssetGet.CreatorID); |
94 | string xmlData = Utils.BytesToString(ncAssetGet.Data); | 94 | string xmlData = Utils.BytesToString(ncAssetGet.Data); |
95 | XmlDocument ncAssetGetXmlDoc = new XmlDocument(); | 95 | XmlDocument ncAssetGetXmlDoc = new XmlDocument(); |
96 | ncAssetGetXmlDoc.XmlResolver=null; | ||
97 | ncAssetGetXmlDoc.LoadXml(xmlData); | 96 | ncAssetGetXmlDoc.LoadXml(xmlData); |
98 | 97 | ||
99 | // Console.WriteLine(ncAssetGetXmlDoc.OuterXml); | 98 | // Console.WriteLine(ncAssetGetXmlDoc.OuterXml); |
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index f5b575b..e7f0aec 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | |||
@@ -110,7 +110,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
110 | 110 | ||
111 | public HttpRequestModule() | 111 | public HttpRequestModule() |
112 | { | 112 | { |
113 | ServicePointManager.ServerCertificateValidationCallback +=ValidateServerCertificate; | 113 | // ServicePointManager.ServerCertificateValidationCallback +=ValidateServerCertificate; |
114 | } | 114 | } |
115 | 115 | ||
116 | public static bool ValidateServerCertificate( | 116 | public static bool ValidateServerCertificate( |
@@ -666,7 +666,8 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
666 | ResponseBody = e.Message; | 666 | ResponseBody = e.Message; |
667 | } | 667 | } |
668 | } | 668 | } |
669 | catch (Exception e) | 669 | // catch (Exception e) |
670 | catch | ||
670 | { | 671 | { |
671 | // Don't crash on anything else | 672 | // Don't crash on anything else |
672 | } | 673 | } |
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index 11fc513..5f72733 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | |||
@@ -258,7 +258,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
258 | string uri = "/lslhttp/" + urlcode.ToString() + "/"; | 258 | string uri = "/lslhttp/" + urlcode.ToString() + "/"; |
259 | 259 | ||
260 | PollServiceEventArgs args | 260 | PollServiceEventArgs args |
261 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); | 261 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, Drop, urlcode, 25000); |
262 | args.Type = PollServiceEventArgs.EventType.LslHttp; | 262 | args.Type = PollServiceEventArgs.EventType.LslHttp; |
263 | m_HttpServer.AddPollServiceHTTPHandler(uri, args); | 263 | m_HttpServer.AddPollServiceHTTPHandler(uri, args); |
264 | 264 | ||
@@ -316,7 +316,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
316 | string uri = "/lslhttps/" + urlcode.ToString() + "/"; | 316 | string uri = "/lslhttps/" + urlcode.ToString() + "/"; |
317 | 317 | ||
318 | PollServiceEventArgs args | 318 | PollServiceEventArgs args |
319 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, urlcode, 25000); | 319 | = new PollServiceEventArgs(HttpRequestHandler, uri, HasEvents, GetEvents, NoEvents, Drop, urlcode, 25000); |
320 | args.Type = PollServiceEventArgs.EventType.LslHttp; | 320 | args.Type = PollServiceEventArgs.EventType.LslHttp; |
321 | m_HttpsServer.AddPollServiceHTTPHandler(uri, args); | 321 | m_HttpsServer.AddPollServiceHTTPHandler(uri, args); |
322 | 322 | ||
@@ -570,6 +570,28 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
570 | } | 570 | } |
571 | } | 571 | } |
572 | } | 572 | } |
573 | |||
574 | protected void Drop(UUID requestID, UUID sessionID) | ||
575 | { | ||
576 | UrlData url = null; | ||
577 | lock (m_RequestMap) | ||
578 | { | ||
579 | if (m_RequestMap.ContainsKey(requestID)) | ||
580 | { | ||
581 | url = m_RequestMap[requestID]; | ||
582 | m_RequestMap.Remove(requestID); | ||
583 | if(url != null) | ||
584 | { | ||
585 | lock (url.requests) | ||
586 | { | ||
587 | if(url.requests.ContainsKey(requestID)) | ||
588 | url.requests.Remove(requestID); | ||
589 | } | ||
590 | } | ||
591 | } | ||
592 | } | ||
593 | } | ||
594 | |||
573 | protected Hashtable GetEvents(UUID requestID, UUID sessionID) | 595 | protected Hashtable GetEvents(UUID requestID, UUID sessionID) |
574 | { | 596 | { |
575 | UrlData url = null; | 597 | UrlData url = null; |
@@ -729,9 +751,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp | |||
729 | else | 751 | else |
730 | { | 752 | { |
731 | queryString = queryString + val + "&"; | 753 | queryString = queryString + val + "&"; |
732 | } | ||
733 | } | 754 | } |
734 | } | 755 | } |
756 | } | ||
735 | if (queryString.Length > 1) | 757 | if (queryString.Length > 1) |
736 | queryString = queryString.Substring(0, queryString.Length - 1); | 758 | queryString = queryString.Substring(0, queryString.Length - 1); |
737 | 759 | ||
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index 8a26ab7..a012093 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs | |||
@@ -362,7 +362,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
362 | { | 362 | { |
363 | graph.FillRectangle(bgFillBrush, 0, 0, width, height); | 363 | graph.FillRectangle(bgFillBrush, 0, 0, width, height); |
364 | } | 364 | } |
365 | } | 365 | } |
366 | else | 366 | else |
367 | { | 367 | { |
368 | bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb); | 368 | bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb); |
@@ -663,59 +663,39 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
663 | } | 663 | } |
664 | else if (nextLine.StartsWith("FontProp")) | 664 | else if (nextLine.StartsWith("FontProp")) |
665 | { | 665 | { |
666 | FontStyle myFontStyle = myFont.Style; | ||
667 | |||
666 | nextLine = nextLine.Remove(0, 8); | 668 | nextLine = nextLine.Remove(0, 8); |
667 | nextLine = nextLine.Trim(); | 669 | nextLine = nextLine.Trim(); |
668 | 670 | ||
669 | string[] fprops = nextLine.Split(partsDelimiter); | 671 | string[] fprops = nextLine.Split(partsDelimiter); |
670 | foreach (string prop in fprops) | 672 | foreach (string prop in fprops) |
671 | { | 673 | { |
672 | |||
673 | switch (prop) | 674 | switch (prop) |
674 | { | 675 | { |
675 | case "B": | 676 | case "B": |
676 | if (!(myFont.Bold)) | 677 | myFontStyle |= FontStyle.Bold; |
677 | { | ||
678 | Font newFont = new Font(myFont, myFont.Style | FontStyle.Bold); | ||
679 | myFont.Dispose(); | ||
680 | myFont = newFont; | ||
681 | } | ||
682 | break; | 678 | break; |
683 | case "I": | 679 | case "I": |
684 | if (!(myFont.Italic)) | 680 | myFontStyle |= FontStyle.Italic; |
685 | { | ||
686 | Font newFont = new Font(myFont, myFont.Style | FontStyle.Italic); | ||
687 | myFont.Dispose(); | ||
688 | myFont = newFont; | ||
689 | } | ||
690 | break; | 681 | break; |
691 | case "U": | 682 | case "U": |
692 | if (!(myFont.Underline)) | 683 | myFontStyle |= FontStyle.Underline; |
693 | { | ||
694 | Font newFont = new Font(myFont, myFont.Style | FontStyle.Underline); | ||
695 | myFont.Dispose(); | ||
696 | myFont = newFont; | ||
697 | } | ||
698 | break; | 684 | break; |
699 | case "S": | 685 | case "S": |
700 | if (!(myFont.Strikeout)) | 686 | myFontStyle |= FontStyle.Strikeout; |
701 | { | ||
702 | Font newFont = new Font(myFont, myFont.Style | FontStyle.Strikeout); | ||
703 | myFont.Dispose(); | ||
704 | myFont = newFont; | ||
705 | } | ||
706 | break; | 687 | break; |
707 | case "R": | 688 | case "R": //This special case resets all font properties |
708 | // We need to place this newFont inside its own context so that the .NET compiler | 689 | myFontStyle = FontStyle.Regular; |
709 | // doesn't complain about a redefinition of an existing newFont, even though there is none | ||
710 | // The mono compiler doesn't produce this error. | ||
711 | { | ||
712 | Font newFont = new Font(myFont, FontStyle.Regular); | ||
713 | myFont.Dispose(); | ||
714 | myFont = newFont; | ||
715 | } | ||
716 | break; | 690 | break; |
717 | } | 691 | } |
718 | } | 692 | } |
693 | if (myFontStyle != myFont.Style) | ||
694 | { | ||
695 | Font newFont = new Font(myFont, myFontStyle); | ||
696 | myFont.Dispose(); | ||
697 | myFont = newFont; | ||
698 | } | ||
719 | } | 699 | } |
720 | else if (nextLine.StartsWith("FontName")) | 700 | else if (nextLine.StartsWith("FontName")) |
721 | { | 701 | { |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs index 2e6f472..e6da6c3 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/UserProfiles/LocalUserProfilesServiceConnector.cs | |||
@@ -163,7 +163,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile | |||
163 | 163 | ||
164 | #region ISharedRegionModule implementation | 164 | #region ISharedRegionModule implementation |
165 | 165 | ||
166 | void ISharedRegionModule.PostInitialise() | 166 | public void PostInitialise() |
167 | { | 167 | { |
168 | if(!Enabled) | 168 | if(!Enabled) |
169 | return; | 169 | return; |
@@ -173,7 +173,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile | |||
173 | 173 | ||
174 | #region IRegionModuleBase implementation | 174 | #region IRegionModuleBase implementation |
175 | 175 | ||
176 | void IRegionModuleBase.Initialise(IConfigSource source) | 176 | public void Initialise(IConfigSource source) |
177 | { | 177 | { |
178 | IConfig moduleConfig = source.Configs["Modules"]; | 178 | IConfig moduleConfig = source.Configs["Modules"]; |
179 | if (moduleConfig != null) | 179 | if (moduleConfig != null) |
@@ -187,12 +187,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile | |||
187 | } | 187 | } |
188 | } | 188 | } |
189 | 189 | ||
190 | void IRegionModuleBase.Close() | 190 | public void Close() |
191 | { | 191 | { |
192 | return; | 192 | return; |
193 | } | 193 | } |
194 | 194 | ||
195 | void IRegionModuleBase.AddRegion(Scene scene) | 195 | public void AddRegion(Scene scene) |
196 | { | 196 | { |
197 | if (!Enabled) | 197 | if (!Enabled) |
198 | return; | 198 | return; |
@@ -206,7 +206,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile | |||
206 | } | 206 | } |
207 | } | 207 | } |
208 | 208 | ||
209 | void IRegionModuleBase.RemoveRegion(Scene scene) | 209 | public void RemoveRegion(Scene scene) |
210 | { | 210 | { |
211 | if (!Enabled) | 211 | if (!Enabled) |
212 | return; | 212 | return; |
@@ -218,7 +218,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Profile | |||
218 | } | 218 | } |
219 | } | 219 | } |
220 | 220 | ||
221 | void IRegionModuleBase.RegionLoaded(Scene scene) | 221 | public void RegionLoaded(Scene scene) |
222 | { | 222 | { |
223 | if (!Enabled) | 223 | if (!Enabled) |
224 | return; | 224 | return; |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs index 9888c3b..8f9bbe8 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MapImage/MapImageServiceModule.cs | |||
@@ -244,11 +244,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
244 | (int)Constants.RegionSize, (int)Constants.RegionSize); | 244 | (int)Constants.RegionSize, (int)Constants.RegionSize); |
245 | using (Bitmap subMapTile = mapTile.Clone(rect, mapTile.PixelFormat)) | 245 | using (Bitmap subMapTile = mapTile.Clone(rect, mapTile.PixelFormat)) |
246 | { | 246 | { |
247 | ConvertAndUploadMaptile(scene, subMapTile, | 247 | if(!ConvertAndUploadMaptile(scene, subMapTile, |
248 | scene.RegionInfo.RegionLocX + (xx / Constants.RegionSize), | 248 | scene.RegionInfo.RegionLocX + (xx / Constants.RegionSize), |
249 | scene.RegionInfo.RegionLocY + (yy / Constants.RegionSize), | 249 | scene.RegionInfo.RegionLocY + (yy / Constants.RegionSize), |
250 | scene.Name); | 250 | scene.Name)) |
251 | } | 251 | { |
252 | m_log.DebugFormat("{0} Upload maptileS for {1} aborted!", LogHeader, scene.Name); | ||
253 | return; // abort rest; | ||
254 | } | ||
255 | } | ||
252 | } | 256 | } |
253 | } | 257 | } |
254 | } | 258 | } |
@@ -280,7 +284,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
280 | } | 284 | } |
281 | } | 285 | } |
282 | 286 | ||
283 | private void ConvertAndUploadMaptile(IScene scene, Image tileImage, uint locX, uint locY, string regionName) | 287 | private bool ConvertAndUploadMaptile(IScene scene, Image tileImage, uint locX, uint locY, string regionName) |
284 | { | 288 | { |
285 | byte[] jpgData = Utils.EmptyBytes; | 289 | byte[] jpgData = Utils.EmptyBytes; |
286 | 290 | ||
@@ -289,19 +293,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MapImage | |||
289 | tileImage.Save(stream, ImageFormat.Jpeg); | 293 | tileImage.Save(stream, ImageFormat.Jpeg); |
290 | jpgData = stream.ToArray(); | 294 | jpgData = stream.ToArray(); |
291 | } | 295 | } |
292 | if (jpgData != Utils.EmptyBytes) | 296 | |
297 | if (jpgData == Utils.EmptyBytes) | ||
293 | { | 298 | { |
294 | string reason = string.Empty; | 299 | m_log.WarnFormat("{0} Tile image generation failed for region {1}", LogHeader, regionName); |
295 | if (!m_MapService.AddMapTile((int)locX, (int)locY, jpgData, scene.RegionInfo.ScopeID, out reason)) | 300 | return false; |
296 | { | ||
297 | m_log.DebugFormat("{0} Unable to upload tile image for {1} at {2}-{3}: {4}", LogHeader, | ||
298 | regionName, locX, locY, reason); | ||
299 | } | ||
300 | } | 301 | } |
301 | else | 302 | |
303 | string reason = string.Empty; | ||
304 | if (!m_MapService.AddMapTile((int)locX, (int)locY, jpgData, scene.RegionInfo.ScopeID, out reason)) | ||
302 | { | 305 | { |
303 | m_log.WarnFormat("{0} Tile image generation failed for region {1}", LogHeader, regionName); | 306 | m_log.DebugFormat("{0} Unable to upload tile image for {1} at {2}-{3}: {4}", LogHeader, |
307 | regionName, locX, locY, reason); | ||
308 | return false; | ||
304 | } | 309 | } |
310 | return true; | ||
305 | } | 311 | } |
306 | } | 312 | } |
307 | } | 313 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MuteList/LocalMuteListServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MuteList/LocalMuteListServiceConnector.cs index 37b30aa..1fc1a6e 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MuteList/LocalMuteListServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MuteList/LocalMuteListServiceConnector.cs | |||
@@ -71,7 +71,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MuteList | |||
71 | if (moduleConfig == null) | 71 | if (moduleConfig == null) |
72 | return; | 72 | return; |
73 | 73 | ||
74 | if (moduleConfig.GetString("MuteListModule", "None") != "MuteListModuleTst") | 74 | if (moduleConfig.GetString("MuteListModule", "None") != "MuteListModule") |
75 | return; | 75 | return; |
76 | 76 | ||
77 | moduleConfig = source.Configs["Modules"]; | 77 | moduleConfig = source.Configs["Modules"]; |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MuteList/RemoteMuteListServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MuteList/RemoteMuteListServiceConnector.cs index a5dec64..a65e2bd 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/MuteList/RemoteMuteListServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/MuteList/RemoteMuteListServiceConnector.cs | |||
@@ -69,7 +69,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.MuteList | |||
69 | if (moduleConfig == null) | 69 | if (moduleConfig == null) |
70 | return; | 70 | return; |
71 | 71 | ||
72 | if (moduleConfig.GetString("MuteListModule", "None") != "MuteListModuleTst") | 72 | if (moduleConfig.GetString("MuteListModule", "None") != "MuteListModule") |
73 | return; | 73 | return; |
74 | 74 | ||
75 | moduleConfig = source.Configs["Modules"]; | 75 | moduleConfig = source.Configs["Modules"]; |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 41515c0..e5c9841 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -435,7 +435,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
435 | WorkManager.RunInThread(o => | 435 | WorkManager.RunInThread(o => |
436 | { | 436 | { |
437 | Thread.Sleep(15000); | 437 | Thread.Sleep(15000); |
438 | m_log.Info("[ARCHIVER]: Starting scripts in scene objects"); | 438 | m_log.Info("[ARCHIVER]: Starting scripts in scene objects..."); |
439 | 439 | ||
440 | foreach (DearchiveContext sceneContext in sceneContexts.Values) | 440 | foreach (DearchiveContext sceneContext in sceneContexts.Values) |
441 | { | 441 | { |
@@ -447,6 +447,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
447 | 447 | ||
448 | sceneContext.SceneObjects.Clear(); | 448 | sceneContext.SceneObjects.Clear(); |
449 | } | 449 | } |
450 | m_log.Info("[ARCHIVER]: Start scripts done"); | ||
450 | }, null, string.Format("ReadArchiveStartScripts (request {0})", m_requestId)); | 451 | }, null, string.Format("ReadArchiveStartScripts (request {0})", m_requestId)); |
451 | } | 452 | } |
452 | 453 | ||
@@ -945,10 +946,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
945 | if (m_assetService.GetMetadata(uuid) != null) | 946 | if (m_assetService.GetMetadata(uuid) != null) |
946 | { | 947 | { |
947 | sbyte asype = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; | 948 | sbyte asype = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; |
948 | if(asype == -2) | ||
949 | { | ||
950 | |||
951 | } | ||
952 | 949 | ||
953 | // m_log.DebugFormat("[ARCHIVER]: found existing asset {0}",uuid); | 950 | // m_log.DebugFormat("[ARCHIVER]: found existing asset {0}",uuid); |
954 | return true; | 951 | return true; |
@@ -958,10 +955,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
958 | { | 955 | { |
959 | sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; | 956 | sbyte assetType = ArchiveConstants.EXTENSION_TO_ASSET_TYPE[extension]; |
960 | 957 | ||
961 | if(assetType == -2) | ||
962 | { | ||
963 | |||
964 | } | ||
965 | if (assetType == (sbyte)AssetType.Unknown) | 958 | if (assetType == (sbyte)AssetType.Unknown) |
966 | { | 959 | { |
967 | m_log.WarnFormat("[ARCHIVER]: Importing {0} byte asset {1} with unknown type", data.Length, uuid); | 960 | m_log.WarnFormat("[ARCHIVER]: Importing {0} byte asset {1} with unknown type", data.Length, uuid); |
@@ -1130,7 +1123,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
1130 | XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable()); | 1123 | XmlNamespaceManager nsmgr = new XmlNamespaceManager(new NameTable()); |
1131 | XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None); | 1124 | XmlParserContext context = new XmlParserContext(null, nsmgr, null, XmlSpace.None); |
1132 | XmlTextReader xtr = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context); | 1125 | XmlTextReader xtr = new XmlTextReader(Encoding.ASCII.GetString(data), XmlNodeType.Document, context); |
1133 | xtr.ProhibitDtd = true; | ||
1134 | 1126 | ||
1135 | // Loaded metadata will be empty if no information exists in the archive | 1127 | // Loaded metadata will be empty if no information exists in the archive |
1136 | dearchivedScenes.LoadedCreationDateTime = 0; | 1128 | dearchivedScenes.LoadedCreationDateTime = 0; |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs index 5d3be62..8c0ef88 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsDearchiver.cs | |||
@@ -93,7 +93,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
93 | 93 | ||
94 | StringReader sr = new StringReader(xml); | 94 | StringReader sr = new StringReader(xml); |
95 | XmlTextReader reader = new XmlTextReader(sr); | 95 | XmlTextReader reader = new XmlTextReader(sr); |
96 | reader.ProhibitDtd = true; | ||
97 | 96 | ||
98 | reader.ReadStartElement("assets"); | 97 | reader.ReadStartElement("assets"); |
99 | reader.Read(); | 98 | reader.Read(); |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 3c45b68..0ca76e4 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -26,7 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections.Concurrent; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.IO; | 31 | using System.IO; |
32 | using System.Linq; | 32 | using System.Linq; |
@@ -668,7 +668,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
668 | public UUID user; | 668 | public UUID user; |
669 | } | 669 | } |
670 | 670 | ||
671 | private OpenSim.Framework.BlockingQueue<EstateAccessDeltaRequest> deltaRequests = new OpenSim.Framework.BlockingQueue<EstateAccessDeltaRequest>(); | 671 | private BlockingCollection<EstateAccessDeltaRequest> deltaRequests = new BlockingCollection<EstateAccessDeltaRequest>(); |
672 | 672 | ||
673 | private void handleEstateAccessDeltaRequest(IClientAPI _remote_client, UUID _invoice, int _estateAccessType, UUID _user) | 673 | private void handleEstateAccessDeltaRequest(IClientAPI _remote_client, UUID _invoice, int _estateAccessType, UUID _user) |
674 | { | 674 | { |
@@ -683,7 +683,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
683 | newreq.estateAccessType = _estateAccessType; | 683 | newreq.estateAccessType = _estateAccessType; |
684 | newreq.user = _user; | 684 | newreq.user = _user; |
685 | 685 | ||
686 | deltaRequests.Enqueue(newreq); | 686 | deltaRequests.Add(newreq); |
687 | 687 | ||
688 | lock(deltareqLock) | 688 | lock(deltareqLock) |
689 | { | 689 | { |
@@ -713,9 +713,11 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
713 | bool sentGroupsFull = false; | 713 | bool sentGroupsFull = false; |
714 | bool sentManagersFull = false; | 714 | bool sentManagersFull = false; |
715 | 715 | ||
716 | EstateAccessDeltaRequest req; | ||
716 | while(Scene.IsRunning) | 717 | while(Scene.IsRunning) |
717 | { | 718 | { |
718 | EstateAccessDeltaRequest req = deltaRequests.Dequeue(500); | 719 | req = null; |
720 | deltaRequests.TryTake(out req, 500); | ||
719 | 721 | ||
720 | if(!Scene.IsRunning) | 722 | if(!Scene.IsRunning) |
721 | break; | 723 | break; |
@@ -757,7 +759,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
757 | changed.Clear(); | 759 | changed.Clear(); |
758 | lock(deltareqLock) | 760 | lock(deltareqLock) |
759 | { | 761 | { |
760 | if(deltaRequests.Count() != 0) | 762 | if(deltaRequests.Count != 0) |
761 | continue; | 763 | continue; |
762 | runnigDeltaExec = false; | 764 | runnigDeltaExec = false; |
763 | return; | 765 | return; |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index b1f5122..7ba4a48 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -1833,26 +1833,23 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1833 | 1833 | ||
1834 | private void EventManagerOnRegisterCaps(UUID agentID, Caps caps) | 1834 | private void EventManagerOnRegisterCaps(UUID agentID, Caps caps) |
1835 | { | 1835 | { |
1836 | //string capsBase = "/CAPS/" + UUID.Random(); | 1836 | string cap = "/CAPS/" + UUID.Random(); |
1837 | string capsBase = "/CAPS/" + caps.CapsObjectPath; | ||
1838 | caps.RegisterHandler( | 1837 | caps.RegisterHandler( |
1839 | "RemoteParcelRequest", | 1838 | "RemoteParcelRequest", |
1840 | new RestStreamHandler( | 1839 | new RestStreamHandler( |
1841 | "POST", | 1840 | "POST", cap, |
1842 | capsBase, | ||
1843 | (request, path, param, httpRequest, httpResponse) | 1841 | (request, path, param, httpRequest, httpResponse) |
1844 | => RemoteParcelRequest(request, path, param, agentID, caps), | 1842 | => RemoteParcelRequest(request, path, param, agentID, caps), |
1845 | "RemoteParcelRequest", | 1843 | "RemoteParcelRequest", |
1846 | agentID.ToString())); | 1844 | agentID.ToString())); |
1847 | 1845 | ||
1848 | UUID parcelCapID = UUID.Random(); | 1846 | cap = "/CAPS/" + UUID.Random(); |
1849 | caps.RegisterHandler( | 1847 | caps.RegisterHandler( |
1850 | "ParcelPropertiesUpdate", | 1848 | "ParcelPropertiesUpdate", |
1851 | new RestStreamHandler( | 1849 | new RestStreamHandler( |
1852 | "POST", | 1850 | "POST", cap, |
1853 | "/CAPS/" + parcelCapID, | 1851 | (request, path, param, httpRequest, httpResponse) |
1854 | (request, path, param, httpRequest, httpResponse) | 1852 | => ProcessPropertiesUpdate(request, path, param, agentID, caps), |
1855 | => ProcessPropertiesUpdate(request, path, param, agentID, caps), | ||
1856 | "ParcelPropertiesUpdate", | 1853 | "ParcelPropertiesUpdate", |
1857 | agentID.ToString())); | 1854 | agentID.ToString())); |
1858 | } | 1855 | } |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 4471432..51e6071 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -1396,9 +1396,9 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1396 | byte[] tempConvertArr = new byte[LandBitmap.GetLength(0) * LandBitmap.GetLength(1) / 8]; | 1396 | byte[] tempConvertArr = new byte[LandBitmap.GetLength(0) * LandBitmap.GetLength(1) / 8]; |
1397 | 1397 | ||
1398 | int tempByte = 0; | 1398 | int tempByte = 0; |
1399 | int i, byteNum = 0; | 1399 | int byteNum = 0; |
1400 | int mask = 1; | 1400 | int mask = 1; |
1401 | i = 0; | 1401 | |
1402 | for (int y = 0; y < LandBitmap.GetLength(1); y++) | 1402 | for (int y = 0; y < LandBitmap.GetLength(1); y++) |
1403 | { | 1403 | { |
1404 | for (int x = 0; x < LandBitmap.GetLength(0); x++) | 1404 | for (int x = 0; x < LandBitmap.GetLength(0); x++) |
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs b/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs index 52a80d6..0d84a1f 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/SerialiseObjects.cs | |||
@@ -69,7 +69,6 @@ namespace OpenSim.Region.CoreModules.World.Serialiser | |||
69 | MemoryStream stream = new MemoryStream(); | 69 | MemoryStream stream = new MemoryStream(); |
70 | XmlTextWriter formatter = new XmlTextWriter(stream, Encoding.UTF8); | 70 | XmlTextWriter formatter = new XmlTextWriter(stream, Encoding.UTF8); |
71 | XmlDocument doc = new XmlDocument(); | 71 | XmlDocument doc = new XmlDocument(); |
72 | doc.XmlResolver=null; | ||
73 | doc.LoadXml(xmlstream); | 72 | doc.LoadXml(xmlstream); |
74 | formatter.Formatting = Formatting.Indented; | 73 | formatter.Formatting = Formatting.Indented; |
75 | doc.WriteContentTo(formatter); | 74 | doc.WriteContentTo(formatter); |
diff --git a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs index 23475a1..c9e3141 100644 --- a/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs +++ b/OpenSim/Region/CoreModules/World/Serialiser/Tests/SerialiserTests.cs | |||
@@ -720,8 +720,6 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests | |||
720 | string xml = SceneObjectSerializer.ToOriginalXmlFormat(so); | 720 | string xml = SceneObjectSerializer.ToOriginalXmlFormat(so); |
721 | 721 | ||
722 | XmlTextReader xtr = new XmlTextReader(new StringReader(xml)); | 722 | XmlTextReader xtr = new XmlTextReader(new StringReader(xml)); |
723 | xtr.ProhibitDtd = true; | ||
724 | |||
725 | xtr.ReadStartElement("SceneObjectGroup"); | 723 | xtr.ReadStartElement("SceneObjectGroup"); |
726 | xtr.ReadStartElement("RootPart"); | 724 | xtr.ReadStartElement("RootPart"); |
727 | xtr.ReadStartElement("SceneObjectPart"); | 725 | xtr.ReadStartElement("SceneObjectPart"); |
@@ -833,8 +831,6 @@ namespace OpenSim.Region.CoreModules.World.Serialiser.Tests | |||
833 | string xml2 = m_serialiserModule.SerializeGroupToXml2(so, options); | 831 | string xml2 = m_serialiserModule.SerializeGroupToXml2(so, options); |
834 | 832 | ||
835 | XmlTextReader xtr = new XmlTextReader(new StringReader(xml2)); | 833 | XmlTextReader xtr = new XmlTextReader(new StringReader(xml2)); |
836 | xtr.ProhibitDtd = true; | ||
837 | |||
838 | xtr.ReadStartElement("SceneObjectGroup"); | 834 | xtr.ReadStartElement("SceneObjectGroup"); |
839 | xtr.ReadStartElement("SceneObjectPart"); | 835 | xtr.ReadStartElement("SceneObjectPart"); |
840 | 836 | ||
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs index 2b7db18..14c230a 100644 --- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs +++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs | |||
@@ -125,20 +125,23 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
125 | #region ISoundModule | 125 | #region ISoundModule |
126 | 126 | ||
127 | public virtual void PlayAttachedSound( | 127 | public virtual void PlayAttachedSound( |
128 | UUID soundID, UUID ownerID, UUID objectID, double gain, Vector3 position, byte flags, float radius) | 128 | UUID soundID, UUID ownerID, UUID objectID, double gain, Vector3 position, byte flags) |
129 | { | 129 | { |
130 | SceneObjectPart part; | 130 | SceneObjectPart part; |
131 | if (!m_scene.TryGetSceneObjectPart(objectID, out part)) | 131 | if (!m_scene.TryGetSceneObjectPart(objectID, out part)) |
132 | return; | 132 | return; |
133 | 133 | ||
134 | SceneObjectGroup grp = part.ParentGroup; | 134 | if (part.SoundRadius == 0) |
135 | 135 | part.SoundRadius = MaxDistance; | |
136 | if (radius == 0) | 136 | part.SoundFlags = 0; |
137 | radius = MaxDistance; | ||
138 | 137 | ||
139 | if (part.SoundQueueing) | 138 | if (part.SoundQueueing) |
140 | flags |= (byte)SoundFlags.QUEUE; | 139 | flags |= (byte)SoundFlags.QUEUE; |
141 | 140 | ||
141 | SceneObjectGroup grp = part.ParentGroup; | ||
142 | if(grp == null | grp.IsDeleted) | ||
143 | return; | ||
144 | |||
142 | if (grp.IsAttachment) | 145 | if (grp.IsAttachment) |
143 | { | 146 | { |
144 | ScenePresence ssp = null; | 147 | ScenePresence ssp = null; |
@@ -164,7 +167,7 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
164 | } | 167 | } |
165 | 168 | ||
166 | public virtual void TriggerSound( | 169 | public virtual void TriggerSound( |
167 | UUID soundId, UUID ownerID, UUID objectID, UUID parentID, double gain, Vector3 position, UInt64 handle, float radius) | 170 | UUID soundId, UUID ownerID, UUID objectID, UUID parentID, double gain, Vector3 position, UInt64 handle) |
168 | { | 171 | { |
169 | SceneObjectPart part; | 172 | SceneObjectPart part; |
170 | ScenePresence ssp = null; | 173 | ScenePresence ssp = null; |
@@ -186,26 +189,21 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
186 | 189 | ||
187 | if (!ssp.ParcelAllowThisAvatarSounds) | 190 | if (!ssp.ParcelAllowThisAvatarSounds) |
188 | return; | 191 | return; |
189 | |||
190 | /* mantis 7942: coment out to allow trigger in HUDs to send sounds to all | ||
191 | if (grp.HasPrivateAttachmentPoint) | ||
192 | { | ||
193 | ssp.ControllingClient.SendTriggeredSound(soundId, ownerID, | ||
194 | objectID, parentID, handle, position, | ||
195 | (float)gain); | ||
196 | return; | ||
197 | } | ||
198 | */ | ||
199 | } | 192 | } |
200 | } | 193 | } |
201 | 194 | ||
195 | float radius = (float)part.SoundRadius; | ||
202 | if (radius == 0) | 196 | if (radius == 0) |
197 | { | ||
203 | radius = MaxDistance; | 198 | radius = MaxDistance; |
199 | part.SoundRadius = MaxDistance; | ||
200 | } | ||
201 | part.SoundFlags = 0; | ||
204 | 202 | ||
203 | radius *= radius; | ||
205 | m_scene.ForEachRootScenePresence(delegate(ScenePresence sp) | 204 | m_scene.ForEachRootScenePresence(delegate(ScenePresence sp) |
206 | { | 205 | { |
207 | double dis = Util.GetDistanceTo(sp.AbsolutePosition, position); | 206 | if (Vector3.DistanceSquared(sp.AbsolutePosition, position) > radius) // Max audio distance |
208 | if (dis > radius) // Max audio distance | ||
209 | return; | 207 | return; |
210 | 208 | ||
211 | sp.ControllingClient.SendTriggeredSound(soundId, ownerID, | 209 | sp.ControllingClient.SendTriggeredSound(soundId, ownerID, |
@@ -225,16 +223,14 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
225 | 223 | ||
226 | private static void StopSound(SceneObjectPart m_host) | 224 | private static void StopSound(SceneObjectPart m_host) |
227 | { | 225 | { |
228 | // m_host.AdjustSoundGain(0); | ||
229 | m_host.Sound = UUID.Zero; | 226 | m_host.Sound = UUID.Zero; |
230 | m_host.SoundFlags = (byte)SoundFlags.STOP; | 227 | m_host.SoundFlags = (byte)SoundFlags.STOP; |
231 | m_host.SoundRadius = 0; | ||
232 | m_host.SoundGain = 0; | 228 | m_host.SoundGain = 0; |
233 | m_host.ScheduleFullUpdate(); | 229 | m_host.ScheduleFullUpdate(); |
234 | m_host.SendFullUpdateToAllClients(); | 230 | m_host.SendFullUpdateToAllClients(); |
235 | } | 231 | } |
236 | 232 | ||
237 | public virtual void PreloadSound(UUID objectID, UUID soundID, float radius) | 233 | public virtual void PreloadSound(UUID objectID, UUID soundID) |
238 | { | 234 | { |
239 | SceneObjectPart part; | 235 | SceneObjectPart part; |
240 | if (soundID == UUID.Zero | 236 | if (soundID == UUID.Zero |
@@ -243,12 +239,17 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
243 | return; | 239 | return; |
244 | } | 240 | } |
245 | 241 | ||
242 | float radius = (float)part.SoundRadius; | ||
246 | if (radius == 0) | 243 | if (radius == 0) |
244 | { | ||
247 | radius = MaxDistance; | 245 | radius = MaxDistance; |
246 | part.SoundRadius = radius; | ||
247 | } | ||
248 | 248 | ||
249 | radius *= 4.0f * radius; // avatars and prims do move | ||
249 | m_scene.ForEachRootScenePresence(delegate(ScenePresence sp) | 250 | m_scene.ForEachRootScenePresence(delegate(ScenePresence sp) |
250 | { | 251 | { |
251 | if (Util.GetDistanceTo(sp.AbsolutePosition, part.AbsolutePosition) < radius) | 252 | if (Vector3.DistanceSquared(sp.AbsolutePosition, part.AbsolutePosition) < radius) |
252 | sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID); | 253 | sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID); |
253 | }); | 254 | }); |
254 | } | 255 | } |
@@ -262,7 +263,7 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
262 | // 20080530 Updated to remove code duplication | 263 | // 20080530 Updated to remove code duplication |
263 | // 20080530 Stop sound if there is one, otherwise volume only changes don't work | 264 | // 20080530 Stop sound if there is one, otherwise volume only changes don't work |
264 | public void LoopSound(UUID objectID, UUID soundID, | 265 | public void LoopSound(UUID objectID, UUID soundID, |
265 | double volume, double radius, bool isMaster, bool isSlave) | 266 | double volume, bool isMaster, bool isSlave) |
266 | { | 267 | { |
267 | SceneObjectPart m_host; | 268 | SceneObjectPart m_host; |
268 | if (!m_scene.TryGetSceneObjectPart(objectID, out m_host)) | 269 | if (!m_scene.TryGetSceneObjectPart(objectID, out m_host)) |
@@ -280,14 +281,15 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
280 | m_host.Sound = soundID; | 281 | m_host.Sound = soundID; |
281 | m_host.SoundGain = volume; | 282 | m_host.SoundGain = volume; |
282 | m_host.SoundFlags = iflags; | 283 | m_host.SoundFlags = iflags; |
283 | m_host.SoundRadius = radius; | 284 | if (m_host.SoundRadius == 0) |
285 | m_host.SoundRadius = MaxDistance; | ||
284 | 286 | ||
285 | m_host.ScheduleFullUpdate(); | 287 | m_host.ScheduleFullUpdate(); |
286 | m_host.SendFullUpdateToAllClients(); | 288 | m_host.SendFullUpdateToAllClients(); |
287 | } | 289 | } |
288 | 290 | ||
289 | public void SendSound(UUID objectID, UUID soundID, double volume, | 291 | public void SendSound(UUID objectID, UUID soundID, double volume, |
290 | bool triggered, byte flags, float radius, bool useMaster, | 292 | bool triggered, byte flags, bool useMaster, |
291 | bool isMaster) | 293 | bool isMaster) |
292 | { | 294 | { |
293 | if (soundID == UUID.Zero) | 295 | if (soundID == UUID.Zero) |
@@ -305,7 +307,7 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
305 | ulong regionHandle = m_scene.RegionInfo.RegionHandle; | 307 | ulong regionHandle = m_scene.RegionInfo.RegionHandle; |
306 | 308 | ||
307 | if(triggered) | 309 | if(triggered) |
308 | TriggerSound(soundID, part.OwnerID, part.UUID, parentID, volume, position, regionHandle, radius); | 310 | TriggerSound(soundID, part.OwnerID, part.UUID, parentID, volume, position, regionHandle); |
309 | else | 311 | else |
310 | { | 312 | { |
311 | byte bflags = 0; | 313 | byte bflags = 0; |
@@ -315,7 +317,7 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
315 | // TODO check viewer seems to accept both | 317 | // TODO check viewer seems to accept both |
316 | if (useMaster) | 318 | if (useMaster) |
317 | bflags |= (byte)SoundFlags.SYNC_SLAVE; | 319 | bflags |= (byte)SoundFlags.SYNC_SLAVE; |
318 | PlayAttachedSound(soundID, part.OwnerID, part.UUID, volume, position, bflags, radius); | 320 | PlayAttachedSound(soundID, part.OwnerID, part.UUID, volume, position, bflags); |
319 | } | 321 | } |
320 | } | 322 | } |
321 | 323 | ||
@@ -336,6 +338,7 @@ namespace OpenSim.Region.CoreModules.World.Sound | |||
336 | 338 | ||
337 | if (dis > MaxDistance) // Max audio distance | 339 | if (dis > MaxDistance) // Max audio distance |
338 | return; | 340 | return; |
341 | |||
339 | else if (!Util.IsInsideBox(sp.AbsolutePosition, min, max)) | 342 | else if (!Util.IsInsideBox(sp.AbsolutePosition, min, max)) |
340 | return; | 343 | return; |
341 | 344 | ||
diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index a1fff62..ebcb678 100644 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs | |||
@@ -47,7 +47,6 @@ namespace OpenSim.Region.CoreModules | |||
47 | 47 | ||
48 | private uint m_frame = 0; | 48 | private uint m_frame = 0; |
49 | private int m_dataVersion = 0; | 49 | private int m_dataVersion = 0; |
50 | private int m_regionID = 0; | ||
51 | private int m_frameUpdateRate = 150; | 50 | private int m_frameUpdateRate = 150; |
52 | //private Random m_rndnums = new Random(Environment.TickCount); | 51 | //private Random m_rndnums = new Random(Environment.TickCount); |
53 | private Scene m_scene = null; | 52 | private Scene m_scene = null; |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 03a4d34..b5a6912 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Concurrent; | ||
30 | using System.Collections.Generic; | 31 | using System.Collections.Generic; |
31 | using System.Drawing; | 32 | using System.Drawing; |
32 | using System.Drawing.Imaging; | 33 | using System.Drawing.Imaging; |
@@ -67,7 +68,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
67 | private static readonly string DEFAULT_WORLD_MAP_EXPORT_PATH = "exportmap.jpg"; | 68 | private static readonly string DEFAULT_WORLD_MAP_EXPORT_PATH = "exportmap.jpg"; |
68 | private static readonly UUID STOP_UUID = UUID.Random(); | 69 | private static readonly UUID STOP_UUID = UUID.Random(); |
69 | 70 | ||
70 | private OpenSim.Framework.BlockingQueue<MapRequestState> requests = new OpenSim.Framework.BlockingQueue<MapRequestState>(); | 71 | private BlockingCollection<MapRequestState> requests = new BlockingCollection<MapRequestState>(); |
71 | 72 | ||
72 | private ManualResetEvent m_mapBlockRequestEvent = new ManualResetEvent(false); | 73 | private ManualResetEvent m_mapBlockRequestEvent = new ManualResetEvent(false); |
73 | private Dictionary<UUID, Queue<MapBlockRequestData>> m_mapBlockRequests = new Dictionary<UUID, Queue<MapBlockRequestData>>(); | 74 | private Dictionary<UUID, Queue<MapBlockRequestData>> m_mapBlockRequests = new Dictionary<UUID, Queue<MapBlockRequestData>>(); |
@@ -422,7 +423,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
422 | st.itemtype = 0; | 423 | st.itemtype = 0; |
423 | st.regionhandle = 0; | 424 | st.regionhandle = 0; |
424 | 425 | ||
425 | requests.Enqueue(st); | 426 | requests.Add(st); |
426 | 427 | ||
427 | MapBlockRequestData req = new MapBlockRequestData(); | 428 | MapBlockRequestData req = new MapBlockRequestData(); |
428 | 429 | ||
@@ -719,7 +720,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
719 | av = null; | 720 | av = null; |
720 | st = null; | 721 | st = null; |
721 | 722 | ||
722 | st = requests.Dequeue(4500); | 723 | requests.TryTake(out st, 4500); |
723 | Watchdog.UpdateThread(); | 724 | Watchdog.UpdateThread(); |
724 | 725 | ||
725 | if (st == null || st.agentID == UUID.Zero) | 726 | if (st == null || st.agentID == UUID.Zero) |
@@ -795,8 +796,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
795 | else | 796 | else |
796 | { | 797 | { |
797 | // request still beeing processed, enqueue it back | 798 | // request still beeing processed, enqueue it back |
798 | requests.Enqueue(st); | 799 | requests.Add(st); |
799 | if (requests.Count() < 3) | 800 | if (requests.Count < 3) |
800 | Thread.Sleep(100); | 801 | Thread.Sleep(100); |
801 | } | 802 | } |
802 | } | 803 | } |
@@ -839,7 +840,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
839 | st.itemtype = itemtype; | 840 | st.itemtype = itemtype; |
840 | st.regionhandle = regionhandle; | 841 | st.regionhandle = regionhandle; |
841 | 842 | ||
842 | requests.Enqueue(st); | 843 | requests.Add(st); |
843 | } | 844 | } |
844 | 845 | ||
845 | uint[] itemTypesForcedSend = new uint[] { 6, 1, 7, 10 }; // green dots, infohub, land sells | 846 | uint[] itemTypesForcedSend = new uint[] { 6, 1, 7, 10 }; // green dots, infohub, land sells |