diff options
Diffstat (limited to 'OpenSim')
3 files changed, 23 insertions, 15 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 27645e4..11f53dd 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -785,6 +785,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
785 | { | 785 | { |
786 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 786 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
787 | 787 | ||
788 | /* | ||
788 | GroupProfileData profile = new GroupProfileData(); | 789 | GroupProfileData profile = new GroupProfileData(); |
789 | 790 | ||
790 | 791 | ||
@@ -813,7 +814,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
813 | profile.MemberTitle = memberInfo.GroupTitle; | 814 | profile.MemberTitle = memberInfo.GroupTitle; |
814 | profile.PowersMask = memberInfo.GroupPowers; | 815 | profile.PowersMask = memberInfo.GroupPowers; |
815 | } | 816 | } |
816 | 817 | */ | |
818 | UUID agent = GetRequestingAgentID(remoteClient); | ||
819 | GroupProfileData profile = m_groupData.GetMemberGroupProfile(agent, groupID, agent); | ||
817 | return profile; | 820 | return profile; |
818 | } | 821 | } |
819 | 822 | ||
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs index 6b5b40a..cff3212 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs | |||
@@ -51,7 +51,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
51 | /// GroupID may be specified instead, in which case this parmeter will be null. | 51 | /// GroupID may be specified instead, in which case this parmeter will be null. |
52 | /// </param> | 52 | /// </param> |
53 | GroupRecord GetGroupRecord(UUID RequestingAgentID, UUID GroupID, string GroupName); | 53 | GroupRecord GetGroupRecord(UUID RequestingAgentID, UUID GroupID, string GroupName); |
54 | 54 | GroupProfileData GetMemberGroupProfile(UUID requestingAgentID, UUID GroupID, UUID AgentID); | |
55 | |||
55 | List<DirGroupsReplyData> FindGroups(UUID RequestingAgentID, string search); | 56 | List<DirGroupsReplyData> FindGroups(UUID RequestingAgentID, string search); |
56 | List<GroupMembersData> GetGroupMembers(UUID RequestingAgentID, UUID GroupID); | 57 | List<GroupMembersData> GetGroupMembers(UUID RequestingAgentID, UUID GroupID); |
57 | 58 | ||
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index acb37f6..2dda3a1 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | |||
@@ -181,9 +181,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
181 | 181 | ||
182 | m_cacheTimeout = groupsConfig.GetInt("GroupsCacheTimeout", 30); | 182 | m_cacheTimeout = groupsConfig.GetInt("GroupsCacheTimeout", 30); |
183 | 183 | ||
184 | // disable cache until it is fixed | ||
185 | m_cacheTimeout = 0; | ||
186 | |||
187 | if (m_cacheTimeout == 0) | 184 | if (m_cacheTimeout == 0) |
188 | { | 185 | { |
189 | m_log.WarnFormat("[XMLRPC-GROUPS-CONNECTOR]: Groups Cache Disabled."); | 186 | m_log.WarnFormat("[XMLRPC-GROUPS-CONNECTOR]: Groups Cache Disabled."); |
@@ -385,10 +382,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
385 | 382 | ||
386 | GroupMembershipData MemberInfo = GetAgentGroupMembership(requestingAgentID, AgentID, GroupID); | 383 | GroupMembershipData MemberInfo = GetAgentGroupMembership(requestingAgentID, AgentID, GroupID); |
387 | GroupProfileData MemberGroupProfile = GroupProfileHashtableToGroupProfileData(respData); | 384 | GroupProfileData MemberGroupProfile = GroupProfileHashtableToGroupProfileData(respData); |
388 | 385 | if(MemberInfo != null) | |
389 | MemberGroupProfile.MemberTitle = MemberInfo.GroupTitle; | 386 | { |
390 | MemberGroupProfile.PowersMask = MemberInfo.GroupPowers; | 387 | MemberGroupProfile.MemberTitle = MemberInfo.GroupTitle; |
391 | 388 | MemberGroupProfile.PowersMask = MemberInfo.GroupPowers; | |
389 | } | ||
392 | return MemberGroupProfile; | 390 | return MemberGroupProfile; |
393 | } | 391 | } |
394 | 392 | ||
@@ -977,12 +975,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
977 | 975 | ||
978 | try | 976 | try |
979 | { | 977 | { |
980 | resp = req.Send(m_groupsServerURI, 30000); | 978 | resp = req.Send(m_groupsServerURI); |
981 | |||
982 | if ((m_cacheTimeout > 0) && (CacheKey != null)) | ||
983 | { | ||
984 | m_memoryCache.AddOrUpdate(CacheKey, resp, TimeSpan.FromSeconds(m_cacheTimeout)); | ||
985 | } | ||
986 | } | 979 | } |
987 | catch (Exception e) | 980 | catch (Exception e) |
988 | { | 981 | { |
@@ -1004,12 +997,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1004 | m_log.WarnFormat("[XMLRPC-GROUPS-CONNECTOR]: {0} :: {1}", key, param[key].ToString()); | 997 | m_log.WarnFormat("[XMLRPC-GROUPS-CONNECTOR]: {0} :: {1}", key, param[key].ToString()); |
1005 | } | 998 | } |
1006 | } | 999 | } |
1000 | |||
1001 | if ((m_cacheTimeout > 0) && (CacheKey != null)) | ||
1002 | { | ||
1003 | m_memoryCache.AddOrUpdate(CacheKey, resp, 10.0); | ||
1004 | } | ||
1007 | Hashtable respData = new Hashtable(); | 1005 | Hashtable respData = new Hashtable(); |
1008 | respData.Add("error", e.ToString()); | 1006 | respData.Add("error", e.ToString()); |
1009 | return respData; | 1007 | return respData; |
1010 | } | 1008 | } |
1011 | } | 1009 | } |
1012 | 1010 | ||
1011 | if ((m_cacheTimeout > 0) && (CacheKey != null)) | ||
1012 | { | ||
1013 | m_memoryCache.AddOrUpdate(CacheKey, resp, TimeSpan.FromSeconds(m_cacheTimeout)); | ||
1014 | } | ||
1015 | |||
1013 | if (resp.Value is Hashtable) | 1016 | if (resp.Value is Hashtable) |
1014 | { | 1017 | { |
1015 | Hashtable respData = (Hashtable)resp.Value; | 1018 | Hashtable respData = (Hashtable)resp.Value; |
@@ -1138,6 +1141,7 @@ namespace Nwc.XmlRpc | |||
1138 | request.ContentType = "text/xml"; | 1141 | request.ContentType = "text/xml"; |
1139 | request.AllowWriteStreamBuffering = true; | 1142 | request.AllowWriteStreamBuffering = true; |
1140 | request.KeepAlive = !_disableKeepAlive; | 1143 | request.KeepAlive = !_disableKeepAlive; |
1144 | request.Timeout = 30000; | ||
1141 | 1145 | ||
1142 | using (Stream stream = request.GetRequestStream()) | 1146 | using (Stream stream = request.GetRequestStream()) |
1143 | { | 1147 | { |