aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-02-18 11:14:53 +0000
committerJustin Clarke Casey2008-02-18 11:14:53 +0000
commit1cbef0b9084bce0816c7ef471b3b58d1dbf9de7c (patch)
treed94dd87220392d7efcc80b35ea4d8d0d8fb4f01f /OpenSim
parentSmall change to the IAgentAssetTransactions file that Chi11ken added for me (... (diff)
downloadopensim-SC_OLD-1cbef0b9084bce0816c7ef471b3b58d1dbf9de7c.zip
opensim-SC_OLD-1cbef0b9084bce0816c7ef471b3b58d1dbf9de7c.tar.gz
opensim-SC_OLD-1cbef0b9084bce0816c7ef471b3b58d1dbf9de7c.tar.bz2
opensim-SC_OLD-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')
-rw-r--r--OpenSim/Region/Environment/Interfaces/IWorldComm.cs1
-rw-r--r--OpenSim/Region/Environment/Interfaces/IXMLRPC.cs1
-rw-r--r--OpenSim/Region/Environment/Modules/WorldCommModule.cs22
-rw-r--r--OpenSim/Region/Environment/Modules/XMLRPCModule.cs19
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs7
5 files changed, 50 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Interfaces/IWorldComm.cs b/OpenSim/Region/Environment/Interfaces/IWorldComm.cs
index d8811c6..7567bb2 100644
--- a/OpenSim/Region/Environment/Interfaces/IWorldComm.cs
+++ b/OpenSim/Region/Environment/Interfaces/IWorldComm.cs
@@ -40,5 +40,6 @@ namespace OpenSim.Region.Environment.Interfaces
40 ListenerInfo GetNextMessage(); 40 ListenerInfo GetNextMessage();
41 void ListenControl(int handle, int active); 41 void ListenControl(int handle, int active);
42 void ListenRemove(int handle); 42 void ListenRemove(int handle);
43 void DeleteListener(LLUUID itemID);
43 } 44 }
44} \ No newline at end of file 45} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/Interfaces/IXMLRPC.cs b/OpenSim/Region/Environment/Interfaces/IXMLRPC.cs
index 02b74cb..82b692d 100644
--- a/OpenSim/Region/Environment/Interfaces/IXMLRPC.cs
+++ b/OpenSim/Region/Environment/Interfaces/IXMLRPC.cs
@@ -39,5 +39,6 @@ namespace OpenSim.Region.Environment.Interfaces
39 RPCRequestInfo GetNextRequest(); 39 RPCRequestInfo GetNextRequest();
40 void RemoteDataReply(string channel, string message_id, string sdata, int idata); 40 void RemoteDataReply(string channel, string message_id, string sdata, int idata);
41 bool IsEnabled(); 41 bool IsEnabled();
42 void DeleteChannel(LLUUID itemID);
42 } 43 }
43} \ No newline at end of file 44} \ No newline at end of file
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++)
diff --git a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs
index 762e76d..edd1df8 100644
--- a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs
+++ b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs
@@ -188,6 +188,24 @@ namespace OpenSim.Region.Environment.Modules
188 return channel; 188 return channel;
189 } 189 }
190 190
191 public void DeleteChannel(LLUUID itemID)
192 {
193
194 foreach (RPCChannelInfo li in m_openChannels.Values)
195 {
196
197 if (li.GetItemID().Equals(itemID))
198 {
199
200 m_openChannels.Remove(li.GetChannelID());
201 return;
202
203 }
204
205 }
206
207 }
208
191 /********************************************** 209 /**********************************************
192 * Remote Data Reply 210 * Remote Data Reply
193 * 211 *
@@ -408,5 +426,6 @@ namespace OpenSim.Region.Environment.Modules
408 { 426 {
409 return m_localID; 427 return m_localID;
410 } 428 }
429
411 } 430 }
412} 431}
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs
index c8b1256..1afe71c 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncLSLCommandManager.cs
@@ -120,6 +120,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
120 IHttpRequests iHttpReq = 120 IHttpRequests iHttpReq =
121 m_ScriptEngine.World.RequestModuleInterface<IHttpRequests>(); 121 m_ScriptEngine.World.RequestModuleInterface<IHttpRequests>();
122 iHttpReq.StopHttpRequest(localID, itemID); 122 iHttpReq.StopHttpRequest(localID, itemID);
123
124 IWorldComm comms = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
125 comms.DeleteListener(itemID);
126
127 IXMLRPC xmlrpc = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
128 xmlrpc.DeleteChannel(itemID);
129
123 } 130 }
124 131
125 #region TIMER 132 #region TIMER