diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs index 385f5ad..87f4277 100644 --- a/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/XMLRPC/XMLRPCModule.cs | |||
@@ -36,6 +36,7 @@ using Nini.Config; | |||
36 | using Nwc.XmlRpc; | 36 | using Nwc.XmlRpc; |
37 | using OpenMetaverse; | 37 | using OpenMetaverse; |
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
39 | using OpenSim.Framework.Monitoring; | ||
39 | using OpenSim.Framework.Servers; | 40 | using OpenSim.Framework.Servers; |
40 | using OpenSim.Framework.Servers.HttpServer; | 41 | using OpenSim.Framework.Servers.HttpServer; |
41 | using OpenSim.Region.Framework.Interfaces; | 42 | using OpenSim.Region.Framework.Interfaces; |
@@ -111,13 +112,15 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC | |||
111 | m_rpcPending = new Dictionary<UUID, RPCRequestInfo>(); | 112 | m_rpcPending = new Dictionary<UUID, RPCRequestInfo>(); |
112 | m_rpcPendingResponses = new Dictionary<UUID, RPCRequestInfo>(); | 113 | m_rpcPendingResponses = new Dictionary<UUID, RPCRequestInfo>(); |
113 | m_pendingSRDResponses = new Dictionary<UUID, SendRemoteDataRequest>(); | 114 | m_pendingSRDResponses = new Dictionary<UUID, SendRemoteDataRequest>(); |
114 | 115 | if (config.Configs["XMLRPC"] != null) | |
115 | try | ||
116 | { | ||
117 | m_remoteDataPort = config.Configs["XMLRPC"].GetInt("XmlRpcPort", m_remoteDataPort); | ||
118 | } | ||
119 | catch (Exception) | ||
120 | { | 116 | { |
117 | try | ||
118 | { | ||
119 | m_remoteDataPort = config.Configs["XMLRPC"].GetInt("XmlRpcPort", m_remoteDataPort); | ||
120 | } | ||
121 | catch (Exception) | ||
122 | { | ||
123 | } | ||
121 | } | 124 | } |
122 | } | 125 | } |
123 | 126 | ||
@@ -654,12 +657,8 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC | |||
654 | 657 | ||
655 | public void Process() | 658 | public void Process() |
656 | { | 659 | { |
657 | httpThread = new Thread(SendRequest); | ||
658 | httpThread.Name = "HttpRequestThread"; | ||
659 | httpThread.Priority = ThreadPriority.BelowNormal; | ||
660 | httpThread.IsBackground = true; | ||
661 | _finished = false; | 660 | _finished = false; |
662 | httpThread.Start(); | 661 | httpThread = WorkManager.StartThread(SendRequest, "HttpRequestThread", ThreadPriority.BelowNormal, true, false); |
663 | } | 662 | } |
664 | 663 | ||
665 | /* | 664 | /* |
@@ -675,7 +674,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC | |||
675 | // if not, use as method name | 674 | // if not, use as method name |
676 | UUID parseUID; | 675 | UUID parseUID; |
677 | string mName = "llRemoteData"; | 676 | string mName = "llRemoteData"; |
678 | if ((Channel != null) && (Channel != "")) | 677 | if (!string.IsNullOrEmpty(Channel)) |
679 | if (!UUID.TryParse(Channel, out parseUID)) | 678 | if (!UUID.TryParse(Channel, out parseUID)) |
680 | mName = Channel; | 679 | mName = Channel; |
681 | else | 680 | else |
@@ -731,13 +730,19 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC | |||
731 | } | 730 | } |
732 | 731 | ||
733 | _finished = true; | 732 | _finished = true; |
733 | |||
734 | Watchdog.RemoveThread(); | ||
734 | } | 735 | } |
735 | 736 | ||
736 | public void Stop() | 737 | public void Stop() |
737 | { | 738 | { |
738 | try | 739 | try |
739 | { | 740 | { |
740 | httpThread.Abort(); | 741 | if (httpThread != null) |
742 | { | ||
743 | Watchdog.AbortThread(httpThread.ManagedThreadId); | ||
744 | httpThread = null; | ||
745 | } | ||
741 | } | 746 | } |
742 | catch (Exception) | 747 | catch (Exception) |
743 | { | 748 | { |