diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs index 25ce093..d941118 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs | |||
@@ -44,7 +44,6 @@ using OpenSim.Framework; | |||
44 | 44 | ||
45 | namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | 45 | namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups |
46 | { | 46 | { |
47 | |||
48 | public class XmlRpcGroupDataProvider : IGroupDataProvider | 47 | public class XmlRpcGroupDataProvider : IGroupDataProvider |
49 | { | 48 | { |
50 | private static readonly ILog m_log = | 49 | private static readonly ILog m_log = |
@@ -196,7 +195,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
196 | param["RoleID"] = roleID.ToString(); | 195 | param["RoleID"] = roleID.ToString(); |
197 | 196 | ||
198 | XmlRpcCall("groups.removeRoleFromGroup", param); | 197 | XmlRpcCall("groups.removeRoleFromGroup", param); |
199 | |||
200 | } | 198 | } |
201 | 199 | ||
202 | public void UpdateGroupRole(UUID groupID, UUID roleID, string name, string description, | 200 | public void UpdateGroupRole(UUID groupID, UUID roleID, string name, string description, |
@@ -234,6 +232,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
234 | param["Name"] = GroupName.ToString(); | 232 | param["Name"] = GroupName.ToString(); |
235 | } | 233 | } |
236 | 234 | ||
235 | |||
237 | Hashtable respData = XmlRpcCall("groups.getGroup", param); | 236 | Hashtable respData = XmlRpcCall("groups.getGroup", param); |
238 | 237 | ||
239 | if (respData.Contains("error")) | 238 | if (respData.Contains("error")) |
@@ -249,6 +248,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
249 | Hashtable param = new Hashtable(); | 248 | Hashtable param = new Hashtable(); |
250 | param["GroupID"] = GroupID.ToString(); | 249 | param["GroupID"] = GroupID.ToString(); |
251 | 250 | ||
251 | |||
252 | Hashtable respData = XmlRpcCall("groups.getGroup", param); | 252 | Hashtable respData = XmlRpcCall("groups.getGroup", param); |
253 | 253 | ||
254 | if (respData.Contains("error")) | 254 | if (respData.Contains("error")) |
@@ -314,7 +314,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
314 | return group; | 314 | return group; |
315 | } | 315 | } |
316 | 316 | ||
317 | |||
318 | public void SetAgentActiveGroup(UUID AgentID, UUID GroupID) | 317 | public void SetAgentActiveGroup(UUID AgentID, UUID GroupID) |
319 | { | 318 | { |
320 | Hashtable param = new Hashtable(); | 319 | Hashtable param = new Hashtable(); |
@@ -402,7 +401,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
402 | param["GroupID"] = GroupID.ToString(); | 401 | param["GroupID"] = GroupID.ToString(); |
403 | 402 | ||
404 | XmlRpcCall("groups.removeAgentFromGroup", param); | 403 | XmlRpcCall("groups.removeAgentFromGroup", param); |
405 | |||
406 | } | 404 | } |
407 | 405 | ||
408 | public void AddAgentToGroupRole(UUID AgentID, UUID GroupID, UUID RoleID) | 406 | public void AddAgentToGroupRole(UUID AgentID, UUID GroupID, UUID RoleID) |
@@ -501,6 +499,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
501 | memberships.Add(HashTableToGroupMembershipData((Hashtable)membership)); | 499 | memberships.Add(HashTableToGroupMembershipData((Hashtable)membership)); |
502 | } | 500 | } |
503 | } | 501 | } |
502 | |||
504 | return memberships; | 503 | return memberships; |
505 | } | 504 | } |
506 | 505 | ||
@@ -691,6 +690,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
691 | 690 | ||
692 | Hashtable respData = XmlRpcCall("groups.getGroupNotice", param); | 691 | Hashtable respData = XmlRpcCall("groups.getGroupNotice", param); |
693 | 692 | ||
693 | |||
694 | if (respData.Contains("error")) | 694 | if (respData.Contains("error")) |
695 | { | 695 | { |
696 | return null; | 696 | return null; |
@@ -751,19 +751,18 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
751 | 751 | ||
752 | try | 752 | try |
753 | { | 753 | { |
754 | req.Send(m_serviceURL, 10000); | 754 | resp = req.Send(m_serviceURL, 10000); |
755 | } | 755 | } |
756 | catch (Exception e) | 756 | catch (Exception e) |
757 | { | 757 | { |
758 | m_log.ErrorFormat("[GROUPS]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function); | 758 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: An error has occured while attempting to access the XmlRpcGroups server method: {0}", function); |
759 | m_log.ErrorFormat("[GROUPS]: {0} ", e.ToString()); | 759 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} ", e.ToString()); |
760 | 760 | ||
761 | foreach (KeyValuePair<object, object> kvp in param) | 761 | foreach (KeyValuePair<object, object> kvp in param) |
762 | { | 762 | { |
763 | m_log.WarnFormat("[GROUPS]: {0} :: {1}", kvp.Key.ToString(), kvp.Value.ToString()); | 763 | m_log.WarnFormat("[XMLRPCGROUPDATA]: {0} :: {1}", kvp.Key.ToString(), kvp.Value.ToString()); |
764 | } | 764 | } |
765 | 765 | ||
766 | |||
767 | Hashtable respData = new Hashtable(); | 766 | Hashtable respData = new Hashtable(); |
768 | respData.Add("error", e.ToString()); | 767 | respData.Add("error", e.ToString()); |
769 | return respData; | 768 | return respData; |
@@ -780,21 +779,21 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
780 | return respData; | 779 | return respData; |
781 | } | 780 | } |
782 | 781 | ||
783 | m_log.ErrorFormat("[GROUPS]: The XmlRpc server returned a {1} instead of a hashtable for {0}", function, resp.Value.GetType().ToString()); | 782 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: The XmlRpc server returned a {1} instead of a hashtable for {0}", function, resp.Value.GetType().ToString()); |
784 | 783 | ||
785 | if (resp.Value is ArrayList) | 784 | if (resp.Value is ArrayList) |
786 | { | 785 | { |
787 | ArrayList al = (ArrayList)resp.Value; | 786 | ArrayList al = (ArrayList)resp.Value; |
788 | m_log.ErrorFormat("[GROUPS]: Contains {0} elements", al.Count); | 787 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: Contains {0} elements", al.Count); |
789 | 788 | ||
790 | foreach (object o in al) | 789 | foreach (object o in al) |
791 | { | 790 | { |
792 | m_log.ErrorFormat("[GROUPS]: {0} :: {1}", o.GetType().ToString(), o.ToString()); | 791 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0} :: {1}", o.GetType().ToString(), o.ToString()); |
793 | } | 792 | } |
794 | } | 793 | } |
795 | else | 794 | else |
796 | { | 795 | { |
797 | m_log.ErrorFormat("[GROUPS]: Function returned: {0}", resp.Value.ToString()); | 796 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: Function returned: {0}", resp.Value.ToString()); |
798 | } | 797 | } |
799 | 798 | ||
800 | Hashtable error = new Hashtable(); | 799 | Hashtable error = new Hashtable(); |
@@ -804,17 +803,18 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
804 | 803 | ||
805 | private void LogRespDataToConsoleError(Hashtable respData) | 804 | private void LogRespDataToConsoleError(Hashtable respData) |
806 | { | 805 | { |
807 | m_log.Error("[GROUPS]: Error:"); | 806 | m_log.Error("[XMLRPCGROUPDATA]: Error:"); |
808 | 807 | ||
809 | foreach (string key in respData.Keys) | 808 | foreach (string key in respData.Keys) |
810 | { | 809 | { |
811 | m_log.ErrorFormat("[GROUPS]: Key: {0}", key); | 810 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: Key: {0}", key); |
812 | 811 | ||
813 | string[] lines = respData[key].ToString().Split(new char[] { '\n' }); | 812 | string[] lines = respData[key].ToString().Split(new char[] { '\n' }); |
814 | foreach (string line in lines) | 813 | foreach (string line in lines) |
815 | { | 814 | { |
816 | m_log.ErrorFormat("[GROUPS]: {0}", line); | 815 | m_log.ErrorFormat("[XMLRPCGROUPDATA]: {0}", line); |
817 | } | 816 | } |
817 | |||
818 | } | 818 | } |
819 | } | 819 | } |
820 | } | 820 | } |