aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimMain.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application/OpenSimMain.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs37
1 files changed, 2 insertions, 35 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index aa5a432..35f146d 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -461,7 +461,7 @@ namespace OpenSim
461 { 461 {
462 // set proxy url to RegionInfo 462 // set proxy url to RegionInfo
463 regionInfo.proxyUrl = proxyUrl; 463 regionInfo.proxyUrl = proxyUrl;
464 ProxyCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName); 464 Util.XmlRpcCommand(proxyUrl, "AddPort", port, port + proxyOffset, regionInfo.ExternalHostName);
465 } 465 }
466 466
467 UDPServer udpServer; 467 UDPServer udpServer;
@@ -618,7 +618,7 @@ namespace OpenSim
618 /// </summary> 618 /// </summary>
619 public virtual void Shutdown() 619 public virtual void Shutdown()
620 { 620 {
621 ProxyCommand(proxyUrl, "Stop"); 621 Util.XmlRpcCommand(proxyUrl, "Stop");
622 622
623 if (m_startupCommandsFile != String.Empty) 623 if (m_startupCommandsFile != String.Empty)
624 { 624 {
@@ -1200,39 +1200,6 @@ namespace OpenSim
1200 1200
1201 #endregion 1201 #endregion
1202 1202
1203 // TODO: remove me!! (almost same as XmlRpcCommand)
1204 public object ProxyCommand(string url, string methodName, params object[] args)
1205 {
1206 if(proxyUrl.Length==0) return null;
1207 return SendXmlRpcCommand(url, methodName, args);
1208 }
1209
1210 public object XmlRpcCommand(uint port, string methodName, params object[] args)
1211 {
1212 return SendXmlRpcCommand("http://localhost:"+port, methodName, args);
1213 }
1214
1215 public object XmlRpcCommand(string url, string methodName, params object[] args)
1216 {
1217 return SendXmlRpcCommand(url, methodName, args);
1218 }
1219
1220 private object SendXmlRpcCommand(string url, string methodName, object[] args)
1221 {
1222 try {
1223 //MainLog.Instance.Verbose("XMLRPC", "Sending command {0} to {1}", methodName, url);
1224 XmlRpcRequest client = new XmlRpcRequest(methodName, args);
1225 //MainLog.Instance.Verbose("XMLRPC", client.ToString());
1226 XmlRpcResponse response = client.Send(url, 6000);
1227 if(!response.IsFault) return response.Value;
1228 }
1229 catch(Exception e)
1230 {
1231 m_log.ErrorFormat("XMLRPC Failed to send command {0} to {1}: {2}", methodName, url, e.Message);
1232 }
1233 return null;
1234 }
1235
1236 /// <summary> 1203 /// <summary>
1237 /// Get the start time and up time of Region server 1204 /// Get the start time and up time of Region server
1238 /// </summary> 1205 /// </summary>