diff options
author | Justin Clarke Casey | 2008-02-18 11:14:53 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-02-18 11:14:53 +0000 |
commit | 1cbef0b9084bce0816c7ef471b3b58d1dbf9de7c (patch) | |
tree | d94dd87220392d7efcc80b35ea4d8d0d8fb4f01f /OpenSim/Region/Environment/Modules/WorldCommModule.cs | |
parent | Small change to the IAgentAssetTransactions file that Chi11ken added for me (... (diff) | |
download | opensim-SC-1cbef0b9084bce0816c7ef471b3b58d1dbf9de7c.zip opensim-SC-1cbef0b9084bce0816c7ef471b3b58d1dbf9de7c.tar.gz opensim-SC-1cbef0b9084bce0816c7ef471b3b58d1dbf9de7c.tar.bz2 opensim-SC-1cbef0b9084bce0816c7ef471b3b58d1dbf9de7c.tar.xz |
Patch from Michael Osias IBM (jimbo2120)
In his own words:
If a prim becomes a listener or remote channel and the script is deleted, it cannot become a listener or channel again with a new script.
This patch fixes that.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/WorldCommModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/WorldCommModule.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/WorldCommModule.cs index 6b9ae46..a426eda 100644 --- a/OpenSim/Region/Environment/Modules/WorldCommModule.cs +++ b/OpenSim/Region/Environment/Modules/WorldCommModule.cs | |||
@@ -70,6 +70,7 @@ namespace OpenSim.Region.Environment.Modules | |||
70 | { | 70 | { |
71 | private Scene m_scene; | 71 | private Scene m_scene; |
72 | private object CommListLock = new object(); | 72 | private object CommListLock = new object(); |
73 | private object ListLock = new object(); | ||
73 | private string m_name = "WorldCommModule"; | 74 | private string m_name = "WorldCommModule"; |
74 | private ListenerManager m_listenerManager; | 75 | private ListenerManager m_listenerManager; |
75 | private Queue<ListenerInfo> m_pending; | 76 | private Queue<ListenerInfo> m_pending; |
@@ -136,6 +137,15 @@ namespace OpenSim.Region.Environment.Modules | |||
136 | m_listenerManager.Remove(handle); | 137 | m_listenerManager.Remove(handle); |
137 | } | 138 | } |
138 | 139 | ||
140 | public void DeleteListener(LLUUID itemID) | ||
141 | { | ||
142 | lock (ListLock) | ||
143 | { | ||
144 | m_listenerManager.DeleteListener(itemID); | ||
145 | } | ||
146 | |||
147 | } | ||
148 | |||
139 | // This method scans nearby objects and determines if they are listeners, | 149 | // This method scans nearby objects and determines if they are listeners, |
140 | // and if so if this message fits the filter. If it does, then | 150 | // and if so if this message fits the filter. If it does, then |
141 | // enqueue the message for delivery to the objects listen event handler. | 151 | // enqueue the message for delivery to the objects listen event handler. |
@@ -303,6 +313,18 @@ namespace OpenSim.Region.Environment.Modules | |||
303 | m_listeners.Remove(handle); | 313 | m_listeners.Remove(handle); |
304 | } | 314 | } |
305 | 315 | ||
316 | public void DeleteListener(LLUUID itemID) | ||
317 | { | ||
318 | foreach (ListenerInfo li in m_listeners.Values) | ||
319 | { | ||
320 | if (li.GetItemID().Equals(itemID)) | ||
321 | { | ||
322 | Remove(li.GetHandle()); | ||
323 | return; | ||
324 | } | ||
325 | } | ||
326 | } | ||
327 | |||
306 | private int GetNewHandle() | 328 | private int GetNewHandle() |
307 | { | 329 | { |
308 | for (int i = 0; i < int.MaxValue - 1; i++) | 330 | for (int i = 0; i < int.MaxValue - 1; i++) |