aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
diff options
context:
space:
mode:
authoronefang2019-05-19 21:24:15 +1000
committeronefang2019-05-19 21:24:15 +1000
commit5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch)
treea9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
parentAdd a build script. (diff)
downloadopensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip
opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz
opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2
opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to '')
-rw-r--r--OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs21
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)