diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
4 files changed, 18 insertions, 16 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs index 3cbdde5..693992a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs | |||
@@ -233,17 +233,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
233 | m_Timer[engine].UnSetTimerEvents(localID, itemID); | 233 | m_Timer[engine].UnSetTimerEvents(localID, itemID); |
234 | 234 | ||
235 | // Remove from: HttpRequest | 235 | // Remove from: HttpRequest |
236 | IHttpRequestModule iHttpReq = | 236 | IHttpRequestModule iHttpReq = engine.World.RequestModuleInterface<IHttpRequestModule>(); |
237 | engine.World.RequestModuleInterface<IHttpRequestModule>(); | 237 | if (iHttpReq != null) |
238 | iHttpReq.StopHttpRequest(localID, itemID); | 238 | iHttpReq.StopHttpRequest(localID, itemID); |
239 | 239 | ||
240 | IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>(); | 240 | IWorldComm comms = engine.World.RequestModuleInterface<IWorldComm>(); |
241 | if (comms != null) | 241 | if (comms != null) |
242 | comms.DeleteListener(itemID); | 242 | comms.DeleteListener(itemID); |
243 | 243 | ||
244 | IXMLRPC xmlrpc = engine.World.RequestModuleInterface<IXMLRPC>(); | 244 | IXMLRPC xmlrpc = engine.World.RequestModuleInterface<IXMLRPC>(); |
245 | xmlrpc.DeleteChannels(itemID); | 245 | if (xmlrpc != null) |
246 | xmlrpc.CancelSRDRequests(itemID); | 246 | { |
247 | xmlrpc.DeleteChannels(itemID); | ||
248 | xmlrpc.CancelSRDRequests(itemID); | ||
249 | } | ||
247 | 250 | ||
248 | // Remove Sensors | 251 | // Remove Sensors |
249 | m_SensorRepeat[engine].UnSetSenseRepeaterEvents(localID, itemID); | 252 | m_SensorRepeat[engine].UnSetSenseRepeaterEvents(localID, itemID); |
@@ -325,7 +328,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
325 | { | 328 | { |
326 | List<Object> data = new List<Object>(); | 329 | List<Object> data = new List<Object>(); |
327 | 330 | ||
328 | Object[] listeners=m_Listener[engine].GetSerializationData(itemID); | 331 | Object[] listeners = m_Listener[engine].GetSerializationData(itemID); |
329 | if (listeners.Length > 0) | 332 | if (listeners.Length > 0) |
330 | { | 333 | { |
331 | data.Add("listener"); | 334 | data.Add("listener"); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e9db5d5..fed3122 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -11918,9 +11918,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11918 | return; | 11918 | return; |
11919 | } | 11919 | } |
11920 | 11920 | ||
11921 | System.Text.UTF8Encoding enc = | 11921 | string data = Encoding.UTF8.GetString(a.Data); |
11922 | new System.Text.UTF8Encoding(); | ||
11923 | string data = enc.GetString(a.Data); | ||
11924 | //m_log.Debug(data); | 11922 | //m_log.Debug(data); |
11925 | NotecardCache.Cache(id, data); | 11923 | NotecardCache.Cache(id, data); |
11926 | AsyncCommands. | 11924 | AsyncCommands. |
@@ -11973,9 +11971,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11973 | return; | 11971 | return; |
11974 | } | 11972 | } |
11975 | 11973 | ||
11976 | System.Text.UTF8Encoding enc = | 11974 | string data = Encoding.UTF8.GetString(a.Data); |
11977 | new System.Text.UTF8Encoding(); | ||
11978 | string data = enc.GetString(a.Data); | ||
11979 | //m_log.Debug(data); | 11975 | //m_log.Debug(data); |
11980 | NotecardCache.Cache(id, data); | 11976 | NotecardCache.Cache(id, data); |
11981 | AsyncCommands.DataserverPlugin.DataserverReply(id.ToString(), | 11977 | AsyncCommands.DataserverPlugin.DataserverReply(id.ToString(), |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index b639d36..4d20f7b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1822,8 +1822,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1822 | if (a == null) | 1822 | if (a == null) |
1823 | return UUID.Zero; | 1823 | return UUID.Zero; |
1824 | 1824 | ||
1825 | System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding(); | 1825 | string data = Encoding.UTF8.GetString(a.Data); |
1826 | string data = enc.GetString(a.Data); | ||
1827 | NotecardCache.Cache(assetID, data); | 1826 | NotecardCache.Cache(assetID, data); |
1828 | }; | 1827 | }; |
1829 | 1828 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs index 93e0261..efa86fc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs | |||
@@ -88,13 +88,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
88 | 88 | ||
89 | public Object[] GetSerializationData(UUID itemID) | 89 | public Object[] GetSerializationData(UUID itemID) |
90 | { | 90 | { |
91 | return m_commsPlugin.GetSerializationData(itemID); | 91 | if (m_commsPlugin != null) |
92 | return m_commsPlugin.GetSerializationData(itemID); | ||
93 | else | ||
94 | return new Object[]{}; | ||
92 | } | 95 | } |
93 | 96 | ||
94 | public void CreateFromData(uint localID, UUID itemID, UUID hostID, | 97 | public void CreateFromData(uint localID, UUID itemID, UUID hostID, |
95 | Object[] data) | 98 | Object[] data) |
96 | { | 99 | { |
97 | m_commsPlugin.CreateFromData(localID, itemID, hostID, data); | 100 | if (m_commsPlugin != null) |
101 | m_commsPlugin.CreateFromData(localID, itemID, hostID, data); | ||
98 | } | 102 | } |
99 | } | 103 | } |
100 | } \ No newline at end of file | 104 | } \ No newline at end of file |