aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Addons
diff options
context:
space:
mode:
authorDiva Canto2013-02-25 10:24:28 -0800
committerDiva Canto2013-02-25 10:24:28 -0800
commitf7aa018a783d2e04cdba6d23b9012695f1554061 (patch)
tree2cb1c0c4b454d6b90c4e0abef86d196cc7e9cda9 /OpenSim/Addons
parentMore clarification on the [Groups] section (diff)
downloadopensim-SC_OLD-f7aa018a783d2e04cdba6d23b9012695f1554061.zip
opensim-SC_OLD-f7aa018a783d2e04cdba6d23b9012695f1554061.tar.gz
opensim-SC_OLD-f7aa018a783d2e04cdba6d23b9012695f1554061.tar.bz2
opensim-SC_OLD-f7aa018a783d2e04cdba6d23b9012695f1554061.tar.xz
Fixes mantis #6551 -- misspelled key name. Also fixed an issue with the roles cache.
Diffstat (limited to 'OpenSim/Addons')
-rw-r--r--OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs2
-rw-r--r--OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs2
-rw-r--r--OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs9
-rw-r--r--OpenSim/Addons/Groups/Service/GroupsService.cs6
4 files changed, 16 insertions, 3 deletions
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs
index d1c02db..628ce4d 100644
--- a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs
+++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs
@@ -273,7 +273,7 @@ namespace OpenSim.Groups
273 public bool AddGroupRole(string RequestingAgentID, UUID groupID, UUID roleID, string name, string description, string title, ulong powers, out string reason) 273 public bool AddGroupRole(string RequestingAgentID, UUID groupID, UUID roleID, string name, string description, string title, ulong powers, out string reason)
274 { 274 {
275 string r = string.Empty; 275 string r = string.Empty;
276 bool success = m_CacheWrapper.AddGroupRole(roleID, description, name, powers, title, delegate 276 bool success = m_CacheWrapper.AddGroupRole(groupID, roleID, description, name, powers, title, delegate
277 { 277 {
278 return m_GroupsService.AddGroupRole(RequestingAgentID, groupID, roleID, name, description, title, powers, out r); 278 return m_GroupsService.AddGroupRole(RequestingAgentID, groupID, roleID, name, description, title, powers, out r);
279 }); 279 });
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
index 8c257ed..f991d01 100644
--- a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
+++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
@@ -371,7 +371,7 @@ namespace OpenSim.Groups
371 Dictionary<string, object> result = new Dictionary<string, object>(); 371 Dictionary<string, object> result = new Dictionary<string, object>();
372 372
373 if (!request.ContainsKey("RequestingAgentID") || !request.ContainsKey("GroupID") || !request.ContainsKey("RoleID") || 373 if (!request.ContainsKey("RequestingAgentID") || !request.ContainsKey("GroupID") || !request.ContainsKey("RoleID") ||
374 !request.ContainsKey("Name") || !request.ContainsKey("Descrption") || !request.ContainsKey("Title") || 374 !request.ContainsKey("Name") || !request.ContainsKey("Description") || !request.ContainsKey("Title") ||
375 !request.ContainsKey("Powers") || !request.ContainsKey("OP")) 375 !request.ContainsKey("Powers") || !request.ContainsKey("OP"))
376 NullResult(result, "Bad network data"); 376 NullResult(result, "Bad network data");
377 377
diff --git a/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs b/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs
index f789626..e7d38c2 100644
--- a/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs
+++ b/OpenSim/Addons/Groups/RemoteConnectorCacheWrapper.cs
@@ -393,7 +393,7 @@ namespace OpenSim.Groups
393 } 393 }
394 } 394 }
395 395
396 public bool AddGroupRole(UUID roleID, string description, string name, ulong powers, string title, BooleanDelegate d) 396 public bool AddGroupRole(UUID groupID, UUID roleID, string description, string name, ulong powers, string title, BooleanDelegate d)
397 { 397 {
398 if (d()) 398 if (d())
399 { 399 {
@@ -406,8 +406,15 @@ namespace OpenSim.Groups
406 role.Title = title; 406 role.Title = title;
407 407
408 lock (m_Cache) 408 lock (m_Cache)
409 {
409 m_Cache.AddOrUpdate("role-" + roleID.ToString(), role, GROUPS_CACHE_TIMEOUT); 410 m_Cache.AddOrUpdate("role-" + roleID.ToString(), role, GROUPS_CACHE_TIMEOUT);
410 411
412 // also remove this list
413 if (m_Cache.Contains("roles-" + groupID.ToString()))
414 m_Cache.Remove("roles-" + groupID.ToString());
415
416 }
417
411 return true; 418 return true;
412 } 419 }
413 420
diff --git a/OpenSim/Addons/Groups/Service/GroupsService.cs b/OpenSim/Addons/Groups/Service/GroupsService.cs
index fc567dd..0668870 100644
--- a/OpenSim/Addons/Groups/Service/GroupsService.cs
+++ b/OpenSim/Addons/Groups/Service/GroupsService.cs
@@ -785,10 +785,16 @@ namespace OpenSim.Groups
785 RoleData data = m_Database.RetrieveRole(groupID, roleID); 785 RoleData data = m_Database.RetrieveRole(groupID, roleID);
786 786
787 if (add && data != null) // it already exists, can't create 787 if (add && data != null) // it already exists, can't create
788 {
789 m_log.DebugFormat("[Groups]: Group {0} already exists. Can't create it again", groupID);
788 return false; 790 return false;
791 }
789 792
790 if (!add && data == null) // it deosn't exist, can't update 793 if (!add && data == null) // it deosn't exist, can't update
794 {
795 m_log.DebugFormat("[Groups]: Group {0} doesn't exist. Can't update it", groupID);
791 return false; 796 return false;
797 }
792 798
793 if (add) 799 if (add)
794 data = new RoleData(); 800 data = new RoleData();