aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorDr Scofield2008-10-23 10:15:19 +0000
committerDr Scofield2008-10-23 10:15:19 +0000
commitb91857b8f7809b9bddfa5d36c1ccf84e8142d22b (patch)
tree3fd68658d7b3611b37d9b5017655f56f3c693d33 /OpenSim/Framework
parentcleaning up commented lines in IRCConnector; changing access_password (diff)
downloadopensim-SC_OLD-b91857b8f7809b9bddfa5d36c1ccf84e8142d22b.zip
opensim-SC_OLD-b91857b8f7809b9bddfa5d36c1ccf84e8142d22b.tar.gz
opensim-SC_OLD-b91857b8f7809b9bddfa5d36c1ccf84e8142d22b.tar.bz2
opensim-SC_OLD-b91857b8f7809b9bddfa5d36c1ccf84e8142d22b.tar.xz
Adding AddXmlRpcHandler(name, method, bool) to selectively disable
KeepAlive for certain XmlRpc handlers. Making use of new AddXmlRpcHandler method in RemoteAdminPlugin to avoid clients waiting indefinitely for response. taking note of BaseHttpServer parameter in CommunicationsManager constructor (was passed it but then just ignored so far).
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs8
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs13
2 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index 1bf8c05..dfe0fdc 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -104,6 +104,13 @@ namespace OpenSim.Framework.Communications
104 /// </summary> 104 /// </summary>
105 protected IUserServiceAdmin m_userServiceAdmin; 105 protected IUserServiceAdmin m_userServiceAdmin;
106 106
107
108 public BaseHttpServer HttpServer
109 {
110 get { return m_httpServer; }
111 }
112 protected BaseHttpServer m_httpServer;
113
107 /// <summary> 114 /// <summary>
108 /// Constructor 115 /// Constructor
109 /// </summary> 116 /// </summary>
@@ -117,6 +124,7 @@ namespace OpenSim.Framework.Communications
117 m_networkServersInfo = serversInfo; 124 m_networkServersInfo = serversInfo;
118 m_assetCache = assetCache; 125 m_assetCache = assetCache;
119 m_userProfileCacheService = new UserProfileCacheService(this, libraryRootFolder); 126 m_userProfileCacheService = new UserProfileCacheService(this, libraryRootFolder);
127 m_httpServer = httpServer;
120 // m_transactionsManager = new AgentAssetTransactionsManager(this, dumpAssetsToFile); 128 // m_transactionsManager = new AgentAssetTransactionsManager(this, dumpAssetsToFile);
121 } 129 }
122 130
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index 7e8130a..3d125fb 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -54,6 +54,7 @@ namespace OpenSim.Framework.Servers
54 protected HttpListener m_httpListener; 54 protected HttpListener m_httpListener;
55 protected CoolHTTPListener m_httpListener2; 55 protected CoolHTTPListener m_httpListener2;
56 protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>(); 56 protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>();
57 protected Dictionary<string, bool> m_rpcHandlersKeepAlive = new Dictionary<string, bool>();
57 protected DefaultLLSDMethod m_defaultLlsdHandler = null; // <-- Moving away from the monolithic.. and going to /registered/ 58 protected DefaultLLSDMethod m_defaultLlsdHandler = null; // <-- Moving away from the monolithic.. and going to /registered/
58 protected Dictionary<string, LLSDMethod> m_llsdHandlers = new Dictionary<string, LLSDMethod>(); 59 protected Dictionary<string, LLSDMethod> m_llsdHandlers = new Dictionary<string, LLSDMethod>();
59 protected Dictionary<string, IRequestHandler> m_streamHandlers = new Dictionary<string, IRequestHandler>(); 60 protected Dictionary<string, IRequestHandler> m_streamHandlers = new Dictionary<string, IRequestHandler>();
@@ -141,6 +142,17 @@ namespace OpenSim.Framework.Servers
141 lock (m_rpcHandlers) 142 lock (m_rpcHandlers)
142 { 143 {
143 m_rpcHandlers[method] = handler; 144 m_rpcHandlers[method] = handler;
145 m_rpcHandlersKeepAlive[method] = true; // default
146 return true;
147 }
148 }
149
150 public bool AddXmlRPCHandler(string method, XmlRpcMethod handler, bool keepAlive)
151 {
152 lock (m_rpcHandlers)
153 {
154 m_rpcHandlers[method] = handler;
155 m_rpcHandlersKeepAlive[method] = keepAlive; // default
144 return true; 156 return true;
145 } 157 }
146 } 158 }
@@ -584,6 +596,7 @@ namespace OpenSim.Framework.Servers
584 } 596 }
585 597
586 responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse); 598 responseString = XmlRpcResponseSerializer.Singleton.Serialize(xmlRpcResponse);
599 response.KeepAlive = m_rpcHandlersKeepAlive[methodName];
587 } 600 }
588 else 601 else
589 { 602 {