diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs | 30 |
1 files changed, 17 insertions, 13 deletions
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 | { |