diff options
author | onefang | 2019-09-11 16:36:50 +1000 |
---|---|---|
committer | onefang | 2019-09-11 16:36:50 +1000 |
commit | 50cd1ffd32f69228e566f2b0b89f86ea0d9fe489 (patch) | |
tree | 52f2ab0c04f1a5d7d6ac5dc872981b4b156447e7 /OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs | |
parent | Renamed branch to SledjChisl. (diff) | |
parent | Bump to release flavour, build 0. (diff) | |
download | opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.zip opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.gz opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.bz2 opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.xz |
Merge branch 'SledjChisl'
Diffstat (limited to 'OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs')
-rw-r--r-- | OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs index 26e844e..8502bb5 100644 --- a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs +++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs | |||
@@ -91,9 +91,10 @@ namespace OpenSim.Groups | |||
91 | protected override byte[] ProcessRequest(string path, Stream requestData, | 91 | protected override byte[] ProcessRequest(string path, Stream requestData, |
92 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 92 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
93 | { | 93 | { |
94 | StreamReader sr = new StreamReader(requestData); | 94 | string body; |
95 | string body = sr.ReadToEnd(); | 95 | using(StreamReader sr = new StreamReader(requestData)) |
96 | sr.Close(); | 96 | body = sr.ReadToEnd(); |
97 | |||
97 | body = body.Trim(); | 98 | body = body.Trim(); |
98 | 99 | ||
99 | //m_log.DebugFormat("[XXX]: query String: {0}", body); | 100 | //m_log.DebugFormat("[XXX]: query String: {0}", body); |
@@ -286,7 +287,7 @@ namespace OpenSim.Groups | |||
286 | string requestingAgentID = request["RequestingAgentID"].ToString(); | 287 | string requestingAgentID = request["RequestingAgentID"].ToString(); |
287 | 288 | ||
288 | if (!m_GroupsService.RemoveAgentFromGroup(requestingAgentID, agentID, groupID)) | 289 | if (!m_GroupsService.RemoveAgentFromGroup(requestingAgentID, agentID, groupID)) |
289 | NullResult(result, string.Format("Insufficient permissions.", agentID)); | 290 | NullResult(result, string.Format("Insufficient permissions. {0}", agentID)); |
290 | else | 291 | else |
291 | result["RESULT"] = "true"; | 292 | result["RESULT"] = "true"; |
292 | } | 293 | } |
@@ -393,7 +394,7 @@ namespace OpenSim.Groups | |||
393 | 394 | ||
394 | if (!request.ContainsKey("RequestingAgentID") || !request.ContainsKey("GroupID") || !request.ContainsKey("RoleID") || | 395 | if (!request.ContainsKey("RequestingAgentID") || !request.ContainsKey("GroupID") || !request.ContainsKey("RoleID") || |
395 | !request.ContainsKey("Name") || !request.ContainsKey("Description") || !request.ContainsKey("Title") || | 396 | !request.ContainsKey("Name") || !request.ContainsKey("Description") || !request.ContainsKey("Title") || |
396 | !request.ContainsKey("Powers") || !request.ContainsKey("OP")) | 397 | !request.ContainsKey("Powers") || !request.ContainsKey("OP")) |
397 | NullResult(result, "Bad network data"); | 398 | NullResult(result, "Bad network data"); |
398 | 399 | ||
399 | else | 400 | else |
@@ -519,11 +520,11 @@ namespace OpenSim.Groups | |||
519 | 520 | ||
520 | bool success = false; | 521 | bool success = false; |
521 | if (op == "ADD") | 522 | if (op == "ADD") |
522 | success = m_GroupsService.AddAgentToGroupRole(request["RequestingAgentID"].ToString(), request["AgentID"].ToString(), | 523 | success = m_GroupsService.AddAgentToGroupRole(request["RequestingAgentID"].ToString(), request["AgentID"].ToString(), |
523 | new UUID(request["GroupID"].ToString()), new UUID(request["RoleID"].ToString())); | 524 | new UUID(request["GroupID"].ToString()), new UUID(request["RoleID"].ToString())); |
524 | 525 | ||
525 | else if (op == "DELETE") | 526 | else if (op == "DELETE") |
526 | success = m_GroupsService.RemoveAgentFromGroupRole(request["RequestingAgentID"].ToString(), request["AgentID"].ToString(), | 527 | success = m_GroupsService.RemoveAgentFromGroupRole(request["RequestingAgentID"].ToString(), request["AgentID"].ToString(), |
527 | new UUID(request["GroupID"].ToString()), new UUID(request["RoleID"].ToString())); | 528 | new UUID(request["GroupID"].ToString()), new UUID(request["RoleID"].ToString())); |
528 | 529 | ||
529 | result["RESULT"] = success.ToString(); | 530 | result["RESULT"] = success.ToString(); |
@@ -647,8 +648,8 @@ namespace OpenSim.Groups | |||
647 | string op = request["OP"].ToString(); | 648 | string op = request["OP"].ToString(); |
648 | 649 | ||
649 | if (op == "ADD" && request.ContainsKey("GroupID") && request.ContainsKey("RoleID") && request.ContainsKey("AgentID")) | 650 | if (op == "ADD" && request.ContainsKey("GroupID") && request.ContainsKey("RoleID") && request.ContainsKey("AgentID")) |
650 | { | 651 | { |
651 | bool success = m_GroupsService.AddAgentToGroupInvite(request["RequestingAgentID"].ToString(), | 652 | bool success = m_GroupsService.AddAgentToGroupInvite(request["RequestingAgentID"].ToString(), |
652 | new UUID(request["InviteID"].ToString()), new UUID(request["GroupID"].ToString()), | 653 | new UUID(request["InviteID"].ToString()), new UUID(request["GroupID"].ToString()), |
653 | new UUID(request["RoleID"].ToString()), request["AgentID"].ToString()); | 654 | new UUID(request["RoleID"].ToString()), request["AgentID"].ToString()); |
654 | 655 | ||
@@ -664,7 +665,7 @@ namespace OpenSim.Groups | |||
664 | } | 665 | } |
665 | else if (op == "GET") | 666 | else if (op == "GET") |
666 | { | 667 | { |
667 | GroupInviteInfo invite = m_GroupsService.GetAgentToGroupInvite(request["RequestingAgentID"].ToString(), | 668 | GroupInviteInfo invite = m_GroupsService.GetAgentToGroupInvite(request["RequestingAgentID"].ToString(), |
668 | new UUID(request["InviteID"].ToString())); | 669 | new UUID(request["InviteID"].ToString())); |
669 | 670 | ||
670 | if (invite != null) | 671 | if (invite != null) |