diff options
author | Michael Cortez | 2009-09-18 12:06:33 -0700 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2009-09-18 20:53:44 +0100 |
commit | 0cb012aae5799ec746384c36d4bc99ca699edfe7 (patch) | |
tree | e0d89b1cf4da8bcc88177b38a78a61571d6b8fec /OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | |
parent | remove old OpenSim.Services.ini.example (replaced by OpenSim.Server.ini.example) (diff) | |
download | opensim-SC-0cb012aae5799ec746384c36d4bc99ca699edfe7.zip opensim-SC-0cb012aae5799ec746384c36d4bc99ca699edfe7.tar.gz opensim-SC-0cb012aae5799ec746384c36d4bc99ca699edfe7.tar.bz2 opensim-SC-0cb012aae5799ec746384c36d4bc99ca699edfe7.tar.xz |
Revert "Thank you, mcortez, for a patch to address showing users in group list"
This reverts commit 69ef95693ae6451e2c754b22190557f3bf15777b.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | 42 |
1 files changed, 15 insertions, 27 deletions
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 | |||
855 | IList parameters = new ArrayList(); | 855 | IList parameters = new ArrayList(); |
856 | parameters.Add(param); | 856 | parameters.Add(param); |
857 | 857 | ||
858 | ConfigurableKeepAliveXmlRpcRequest req; | 858 | XmlRpcRequest req; |
859 | req = new ConfigurableKeepAliveXmlRpcRequest(function, parameters, m_disableKeepAlive); | 859 | if (!m_disableKeepAlive) |
860 | { | ||
861 | req = new XmlRpcRequest(function, parameters); | ||
862 | } | ||
863 | else | ||
864 | { | ||
865 | // This seems to solve a major problem on some windows servers | ||
866 | req = new NoKeepAliveXmlRpcRequest(function, parameters); | ||
867 | } | ||
860 | 868 | ||
861 | XmlRpcResponse resp = null; | 869 | XmlRpcResponse resp = null; |
862 | 870 | ||
@@ -866,16 +874,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
866 | } | 874 | } |
867 | catch (Exception e) | 875 | catch (Exception e) |
868 | { | 876 | { |
869 | |||
870 | |||
871 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function); | 877 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function); |
872 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", e.ToString()); | 878 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", e.ToString()); |
873 | 879 | ||
874 | foreach( string ResponseLine in req.RequestResponse.Split(new string[] { Environment.NewLine },StringSplitOptions.None)) | 880 | |
875 | { | ||
876 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", ResponseLine); | ||
877 | } | ||
878 | |||
879 | foreach (string key in param.Keys) | 881 | foreach (string key in param.Keys) |
880 | { | 882 | { |
881 | m_log.WarnFormat("[XMLRPCGROUPDATA]: {0} :: {1}", key, param[key].ToString()); | 883 | m_log.WarnFormat("[XMLRPCGROUPDATA]: {0} :: {1}", key, param[key].ToString()); |
@@ -959,24 +961,20 @@ namespace Nwc.XmlRpc | |||
959 | using System.Reflection; | 961 | using System.Reflection; |
960 | 962 | ||
961 | /// <summary>Class supporting the request side of an XML-RPC transaction.</summary> | 963 | /// <summary>Class supporting the request side of an XML-RPC transaction.</summary> |
962 | public class ConfigurableKeepAliveXmlRpcRequest : XmlRpcRequest | 964 | public class NoKeepAliveXmlRpcRequest : XmlRpcRequest |
963 | { | 965 | { |
964 | private Encoding _encoding = new ASCIIEncoding(); | 966 | private Encoding _encoding = new ASCIIEncoding(); |
965 | private XmlRpcRequestSerializer _serializer = new XmlRpcRequestSerializer(); | 967 | private XmlRpcRequestSerializer _serializer = new XmlRpcRequestSerializer(); |
966 | private XmlRpcResponseDeserializer _deserializer = new XmlRpcResponseDeserializer(); | 968 | private XmlRpcResponseDeserializer _deserializer = new XmlRpcResponseDeserializer(); |
967 | private bool _disableKeepAlive = true; | ||
968 | |||
969 | public string RequestResponse = String.Empty; | ||
970 | 969 | ||
971 | /// <summary>Instantiate an <c>XmlRpcRequest</c> for a specified method and parameters.</summary> | 970 | /// <summary>Instantiate an <c>XmlRpcRequest</c> for a specified method and parameters.</summary> |
972 | /// <param name="methodName"><c>String</c> designating the <i>object.method</i> on the server the request | 971 | /// <param name="methodName"><c>String</c> designating the <i>object.method</i> on the server the request |
973 | /// should be directed to.</param> | 972 | /// should be directed to.</param> |
974 | /// <param name="parameters"><c>ArrayList</c> of XML-RPC type parameters to invoke the request with.</param> | 973 | /// <param name="parameters"><c>ArrayList</c> of XML-RPC type parameters to invoke the request with.</param> |
975 | public ConfigurableKeepAliveXmlRpcRequest(String methodName, IList parameters, bool disableKeepAlive) | 974 | public NoKeepAliveXmlRpcRequest(String methodName, IList parameters) |
976 | { | 975 | { |
977 | MethodName = methodName; | 976 | MethodName = methodName; |
978 | _params = parameters; | 977 | _params = parameters; |
979 | _disableKeepAlive = disableKeepAlive; | ||
980 | } | 978 | } |
981 | 979 | ||
982 | /// <summary>Send the request to the server.</summary> | 980 | /// <summary>Send the request to the server.</summary> |
@@ -991,7 +989,7 @@ namespace Nwc.XmlRpc | |||
991 | request.Method = "POST"; | 989 | request.Method = "POST"; |
992 | request.ContentType = "text/xml"; | 990 | request.ContentType = "text/xml"; |
993 | request.AllowWriteStreamBuffering = true; | 991 | request.AllowWriteStreamBuffering = true; |
994 | request.KeepAlive = !_disableKeepAlive; | 992 | request.KeepAlive = false; |
995 | 993 | ||
996 | Stream stream = request.GetRequestStream(); | 994 | Stream stream = request.GetRequestStream(); |
997 | XmlTextWriter xml = new XmlTextWriter(stream, _encoding); | 995 | XmlTextWriter xml = new XmlTextWriter(stream, _encoding); |
@@ -1002,17 +1000,7 @@ namespace Nwc.XmlRpc | |||
1002 | HttpWebResponse response = (HttpWebResponse)request.GetResponse(); | 1000 | HttpWebResponse response = (HttpWebResponse)request.GetResponse(); |
1003 | StreamReader input = new StreamReader(response.GetResponseStream()); | 1001 | StreamReader input = new StreamReader(response.GetResponseStream()); |
1004 | 1002 | ||
1005 | string inputXml = input.ReadToEnd(); | 1003 | XmlRpcResponse resp = (XmlRpcResponse)_deserializer.Deserialize(input); |
1006 | XmlRpcResponse resp; | ||
1007 | try | ||
1008 | { | ||
1009 | resp = (XmlRpcResponse)_deserializer.Deserialize(inputXml); | ||
1010 | } | ||
1011 | catch (Exception e) | ||
1012 | { | ||
1013 | RequestResponse = inputXml; | ||
1014 | throw e; | ||
1015 | } | ||
1016 | input.Close(); | 1004 | input.Close(); |
1017 | response.Close(); | 1005 | response.Close(); |
1018 | return resp; | 1006 | return resp; |