Fixes mantis #6551 -- misspelled key name. Also fixed an issue with the roles cache.
parent
6a01683aeb
commit
f7aa018a78
|
@ -273,7 +273,7 @@ namespace OpenSim.Groups
|
|||
public bool AddGroupRole(string RequestingAgentID, UUID groupID, UUID roleID, string name, string description, string title, ulong powers, out string reason)
|
||||
{
|
||||
string r = string.Empty;
|
||||
bool success = m_CacheWrapper.AddGroupRole(roleID, description, name, powers, title, delegate
|
||||
bool success = m_CacheWrapper.AddGroupRole(groupID, roleID, description, name, powers, title, delegate
|
||||
{
|
||||
return m_GroupsService.AddGroupRole(RequestingAgentID, groupID, roleID, name, description, title, powers, out r);
|
||||
});
|
||||
|
|
|
@ -371,7 +371,7 @@ namespace OpenSim.Groups
|
|||
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||
|
||||
if (!request.ContainsKey("RequestingAgentID") || !request.ContainsKey("GroupID") || !request.ContainsKey("RoleID") ||
|
||||
!request.ContainsKey("Name") || !request.ContainsKey("Descrption") || !request.ContainsKey("Title") ||
|
||||
!request.ContainsKey("Name") || !request.ContainsKey("Description") || !request.ContainsKey("Title") ||
|
||||
!request.ContainsKey("Powers") || !request.ContainsKey("OP"))
|
||||
NullResult(result, "Bad network data");
|
||||
|
||||
|
|
|
@ -393,7 +393,7 @@ namespace OpenSim.Groups
|
|||
}
|
||||
}
|
||||
|
||||
public bool AddGroupRole(UUID roleID, string description, string name, ulong powers, string title, BooleanDelegate d)
|
||||
public bool AddGroupRole(UUID groupID, UUID roleID, string description, string name, ulong powers, string title, BooleanDelegate d)
|
||||
{
|
||||
if (d())
|
||||
{
|
||||
|
@ -406,8 +406,15 @@ namespace OpenSim.Groups
|
|||
role.Title = title;
|
||||
|
||||
lock (m_Cache)
|
||||
{
|
||||
m_Cache.AddOrUpdate("role-" + roleID.ToString(), role, GROUPS_CACHE_TIMEOUT);
|
||||
|
||||
// also remove this list
|
||||
if (m_Cache.Contains("roles-" + groupID.ToString()))
|
||||
m_Cache.Remove("roles-" + groupID.ToString());
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -785,10 +785,16 @@ namespace OpenSim.Groups
|
|||
RoleData data = m_Database.RetrieveRole(groupID, roleID);
|
||||
|
||||
if (add && data != null) // it already exists, can't create
|
||||
{
|
||||
m_log.DebugFormat("[Groups]: Group {0} already exists. Can't create it again", groupID);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!add && data == null) // it deosn't exist, can't update
|
||||
{
|
||||
m_log.DebugFormat("[Groups]: Group {0} doesn't exist. Can't update it", groupID);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (add)
|
||||
data = new RoleData();
|
||||
|
|
Loading…
Reference in New Issue