From 69ef95693ae6451e2c754b22190557f3bf15777b Mon Sep 17 00:00:00 2001
From: Melanie
Date: Thu, 17 Sep 2009 15:38:17 +0100
Subject: Thank you, mcortez, for a patch to address showing users in group
list Removed patch 0005, which was unrelated and likely accidental, and
further didn't apply.
---
.../XmlRpcGroupsServicesConnectorModule.cs | 42 ++++++++++++++--------
1 file changed, 27 insertions(+), 15 deletions(-)
(limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs')
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
index b3eaa37..805c3d4 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
@@ -855,16 +855,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
IList parameters = new ArrayList();
parameters.Add(param);
- XmlRpcRequest req;
- if (!m_disableKeepAlive)
- {
- req = new XmlRpcRequest(function, parameters);
- }
- else
- {
- // This seems to solve a major problem on some windows servers
- req = new NoKeepAliveXmlRpcRequest(function, parameters);
- }
+ ConfigurableKeepAliveXmlRpcRequest req;
+ req = new ConfigurableKeepAliveXmlRpcRequest(function, parameters, m_disableKeepAlive);
XmlRpcResponse resp = null;
@@ -874,10 +866,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
}
catch (Exception e)
{
+
+
m_log.ErrorFormat("[XMLRPCGROUPDATA]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function);
m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", e.ToString());
-
+ foreach( string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine },StringSplitOptions.None))
+ {
+ m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", ResponseLine);
+ }
+
foreach (string key in param.Keys)
{
m_log.WarnFormat("[XMLRPCGROUPDATA]: {0} :: {1}", key, param[key].ToString());
@@ -961,20 +959,24 @@ namespace Nwc.XmlRpc
using System.Reflection;
/// Class supporting the request side of an XML-RPC transaction.
- public class NoKeepAliveXmlRpcRequest : XmlRpcRequest
+ public class ConfigurableKeepAliveXmlRpcRequest : XmlRpcRequest
{
private Encoding _encoding = new ASCIIEncoding();
private XmlRpcRequestSerializer _serializer = new XmlRpcRequestSerializer();
private XmlRpcResponseDeserializer _deserializer = new XmlRpcResponseDeserializer();
+ private bool _disableKeepAlive = true;
+
+ public string RequestResponse = String.Empty;
/// Instantiate an XmlRpcRequest for a specified method and parameters.
/// String designating the object.method on the server the request
/// should be directed to.
/// ArrayList of XML-RPC type parameters to invoke the request with.
- public NoKeepAliveXmlRpcRequest(String methodName, IList parameters)
+ public ConfigurableKeepAliveXmlRpcRequest(String methodName, IList parameters, bool disableKeepAlive)
{
MethodName = methodName;
_params = parameters;
+ _disableKeepAlive = disableKeepAlive;
}
/// Send the request to the server.
@@ -989,7 +991,7 @@ namespace Nwc.XmlRpc
request.Method = "POST";
request.ContentType = "text/xml";
request.AllowWriteStreamBuffering = true;
- request.KeepAlive = false;
+ request.KeepAlive = !_disableKeepAlive;
Stream stream = request.GetRequestStream();
XmlTextWriter xml = new XmlTextWriter(stream, _encoding);
@@ -1000,7 +1002,17 @@ namespace Nwc.XmlRpc
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader input = new StreamReader(response.GetResponseStream());
- XmlRpcResponse resp = (XmlRpcResponse)_deserializer.Deserialize(input);
+ string inputXml = input.ReadToEnd();
+ XmlRpcResponse resp;
+ try
+ {
+ resp = (XmlRpcResponse)_deserializer.Deserialize(inputXml);
+ }
+ catch (Exception e)
+ {
+ RequestResponse = inputXml;
+ throw e;
+ }
input.Close();
response.Close();
return resp;
--
cgit v1.1
From 0cb012aae5799ec746384c36d4bc99ca699edfe7 Mon Sep 17 00:00:00 2001
From: Michael Cortez
Date: Fri, 18 Sep 2009 12:06:33 -0700
Subject: Revert "Thank you, mcortez, for a patch to address showing users in
group list"
This reverts commit 69ef95693ae6451e2c754b22190557f3bf15777b.
---
.../XmlRpcGroupsServicesConnectorModule.cs | 42 ++++++++--------------
1 file changed, 15 insertions(+), 27 deletions(-)
(limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs')
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
index 805c3d4..b3eaa37 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
@@ -855,8 +855,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
IList parameters = new ArrayList();
parameters.Add(param);
- ConfigurableKeepAliveXmlRpcRequest req;
- req = new ConfigurableKeepAliveXmlRpcRequest(function, parameters, m_disableKeepAlive);
+ XmlRpcRequest req;
+ if (!m_disableKeepAlive)
+ {
+ req = new XmlRpcRequest(function, parameters);
+ }
+ else
+ {
+ // This seems to solve a major problem on some windows servers
+ req = new NoKeepAliveXmlRpcRequest(function, parameters);
+ }
XmlRpcResponse resp = null;
@@ -866,16 +874,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
}
catch (Exception e)
{
-
-
m_log.ErrorFormat("[XMLRPCGROUPDATA]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function);
m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", e.ToString());
- foreach( string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine },StringSplitOptions.None))
- {
- m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", ResponseLine);
- }
-
+
foreach (string key in param.Keys)
{
m_log.WarnFormat("[XMLRPCGROUPDATA]: {0} :: {1}", key, param[key].ToString());
@@ -959,24 +961,20 @@ namespace Nwc.XmlRpc
using System.Reflection;
/// Class supporting the request side of an XML-RPC transaction.
- public class ConfigurableKeepAliveXmlRpcRequest : XmlRpcRequest
+ public class NoKeepAliveXmlRpcRequest : XmlRpcRequest
{
private Encoding _encoding = new ASCIIEncoding();
private XmlRpcRequestSerializer _serializer = new XmlRpcRequestSerializer();
private XmlRpcResponseDeserializer _deserializer = new XmlRpcResponseDeserializer();
- private bool _disableKeepAlive = true;
-
- public string RequestResponse = String.Empty;
/// Instantiate an XmlRpcRequest for a specified method and parameters.
/// String designating the object.method on the server the request
/// should be directed to.
/// ArrayList of XML-RPC type parameters to invoke the request with.
- public ConfigurableKeepAliveXmlRpcRequest(String methodName, IList parameters, bool disableKeepAlive)
+ public NoKeepAliveXmlRpcRequest(String methodName, IList parameters)
{
MethodName = methodName;
_params = parameters;
- _disableKeepAlive = disableKeepAlive;
}
/// Send the request to the server.
@@ -991,7 +989,7 @@ namespace Nwc.XmlRpc
request.Method = "POST";
request.ContentType = "text/xml";
request.AllowWriteStreamBuffering = true;
- request.KeepAlive = !_disableKeepAlive;
+ request.KeepAlive = false;
Stream stream = request.GetRequestStream();
XmlTextWriter xml = new XmlTextWriter(stream, _encoding);
@@ -1002,17 +1000,7 @@ namespace Nwc.XmlRpc
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader input = new StreamReader(response.GetResponseStream());
- string inputXml = input.ReadToEnd();
- XmlRpcResponse resp;
- try
- {
- resp = (XmlRpcResponse)_deserializer.Deserialize(inputXml);
- }
- catch (Exception e)
- {
- RequestResponse = inputXml;
- throw e;
- }
+ XmlRpcResponse resp = (XmlRpcResponse)_deserializer.Deserialize(input);
input.Close();
response.Close();
return resp;
--
cgit v1.1
From 247fdd1a4df55315de7184081ca025ce32e7140d Mon Sep 17 00:00:00 2001
From: Michael Cortez
Date: Thu, 20 Aug 2009 09:41:14 -0700
Subject: Add additional instrumentation so that when there is an xmlrpc call
failure, the actual xml that was returned from the groups service can be
logged.
---
.../XmlRpcGroupsServicesConnectorModule.cs | 42 ++++++++++++++--------
1 file changed, 27 insertions(+), 15 deletions(-)
(limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs')
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
index b3eaa37..805c3d4 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
@@ -855,16 +855,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
IList parameters = new ArrayList();
parameters.Add(param);
- XmlRpcRequest req;
- if (!m_disableKeepAlive)
- {
- req = new XmlRpcRequest(function, parameters);
- }
- else
- {
- // This seems to solve a major problem on some windows servers
- req = new NoKeepAliveXmlRpcRequest(function, parameters);
- }
+ ConfigurableKeepAliveXmlRpcRequest req;
+ req = new ConfigurableKeepAliveXmlRpcRequest(function, parameters, m_disableKeepAlive);
XmlRpcResponse resp = null;
@@ -874,10 +866,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
}
catch (Exception e)
{
+
+
m_log.ErrorFormat("[XMLRPCGROUPDATA]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function);
m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", e.ToString());
-
+ foreach( string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine },StringSplitOptions.None))
+ {
+ m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", ResponseLine);
+ }
+
foreach (string key in param.Keys)
{
m_log.WarnFormat("[XMLRPCGROUPDATA]: {0} :: {1}", key, param[key].ToString());
@@ -961,20 +959,24 @@ namespace Nwc.XmlRpc
using System.Reflection;
/// Class supporting the request side of an XML-RPC transaction.
- public class NoKeepAliveXmlRpcRequest : XmlRpcRequest
+ public class ConfigurableKeepAliveXmlRpcRequest : XmlRpcRequest
{
private Encoding _encoding = new ASCIIEncoding();
private XmlRpcRequestSerializer _serializer = new XmlRpcRequestSerializer();
private XmlRpcResponseDeserializer _deserializer = new XmlRpcResponseDeserializer();
+ private bool _disableKeepAlive = true;
+
+ public string RequestResponse = String.Empty;
/// Instantiate an XmlRpcRequest for a specified method and parameters.
/// String designating the object.method on the server the request
/// should be directed to.
/// ArrayList of XML-RPC type parameters to invoke the request with.
- public NoKeepAliveXmlRpcRequest(String methodName, IList parameters)
+ public ConfigurableKeepAliveXmlRpcRequest(String methodName, IList parameters, bool disableKeepAlive)
{
MethodName = methodName;
_params = parameters;
+ _disableKeepAlive = disableKeepAlive;
}
/// Send the request to the server.
@@ -989,7 +991,7 @@ namespace Nwc.XmlRpc
request.Method = "POST";
request.ContentType = "text/xml";
request.AllowWriteStreamBuffering = true;
- request.KeepAlive = false;
+ request.KeepAlive = !_disableKeepAlive;
Stream stream = request.GetRequestStream();
XmlTextWriter xml = new XmlTextWriter(stream, _encoding);
@@ -1000,7 +1002,17 @@ namespace Nwc.XmlRpc
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
StreamReader input = new StreamReader(response.GetResponseStream());
- XmlRpcResponse resp = (XmlRpcResponse)_deserializer.Deserialize(input);
+ string inputXml = input.ReadToEnd();
+ XmlRpcResponse resp;
+ try
+ {
+ resp = (XmlRpcResponse)_deserializer.Deserialize(inputXml);
+ }
+ catch (Exception e)
+ {
+ RequestResponse = inputXml;
+ throw e;
+ }
input.Close();
response.Close();
return resp;
--
cgit v1.1