diff options
Diffstat (limited to '')
3 files changed, 20 insertions, 19 deletions
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs index 7450c14..8f6be0d 100644 --- a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs +++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnector.cs | |||
@@ -41,7 +41,7 @@ using Nini.Config; | |||
41 | 41 | ||
42 | namespace OpenSim.Groups | 42 | namespace OpenSim.Groups |
43 | { | 43 | { |
44 | public class GroupsServiceRemoteConnector | 44 | public class GroupsServiceRemoteConnector |
45 | { | 45 | { |
46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | 47 | ||
@@ -71,7 +71,7 @@ namespace OpenSim.Groups | |||
71 | } | 71 | } |
72 | /// | 72 | /// |
73 | 73 | ||
74 | m_log.DebugFormat("[Groups.RemoteConnector]: Groups server at {0}, authentication {1}", | 74 | m_log.DebugFormat("[Groups.RemoteConnector]: Groups server at {0}, authentication {1}", |
75 | m_ServerURI, (m_Auth == null ? "None" : m_Auth.GetType().ToString())); | 75 | m_ServerURI, (m_Auth == null ? "None" : m_Auth.GetType().ToString())); |
76 | } | 76 | } |
77 | 77 | ||
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs index d4739c6..b6c75a8 100644 --- a/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs +++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRemoteConnectorModule.cs | |||
@@ -113,7 +113,7 @@ namespace OpenSim.Groups | |||
113 | if (!m_Enabled) | 113 | if (!m_Enabled) |
114 | return; | 114 | return; |
115 | 115 | ||
116 | m_log.DebugFormat("[Groups.RemoteConnector]: Registering {0} with {1}", this.Name, scene.RegionInfo.RegionName); | 116 | m_log.DebugFormat("[Groups.RemoteConnector]: Registering {0} with {1}", this.Name, scene.RegionInfo.RegionName); |
117 | scene.RegisterModuleInterface<IGroupsServicesConnector>(this); | 117 | scene.RegisterModuleInterface<IGroupsServicesConnector>(this); |
118 | m_Scenes.Add(scene); | 118 | m_Scenes.Add(scene); |
119 | } | 119 | } |
@@ -151,7 +151,7 @@ namespace OpenSim.Groups | |||
151 | 151 | ||
152 | #region IGroupsServicesConnector | 152 | #region IGroupsServicesConnector |
153 | 153 | ||
154 | public UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, | 154 | public UUID CreateGroup(UUID RequestingAgentID, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, |
155 | bool allowPublish, bool maturePublish, UUID founderID, out string reason) | 155 | bool allowPublish, bool maturePublish, UUID founderID, out string reason) |
156 | { | 156 | { |
157 | m_log.DebugFormat("[Groups.RemoteConnector]: Creating group {0}", name); | 157 | m_log.DebugFormat("[Groups.RemoteConnector]: Creating group {0}", name); |
@@ -167,7 +167,7 @@ namespace OpenSim.Groups | |||
167 | return groupID; | 167 | return groupID; |
168 | } | 168 | } |
169 | 169 | ||
170 | public bool UpdateGroup(string RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, | 170 | public bool UpdateGroup(string RequestingAgentID, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, |
171 | bool openEnrollment, bool allowPublish, bool maturePublish, out string reason) | 171 | bool openEnrollment, bool allowPublish, bool maturePublish, out string reason) |
172 | { | 172 | { |
173 | string r = string.Empty; | 173 | string r = string.Empty; |
@@ -186,9 +186,9 @@ namespace OpenSim.Groups | |||
186 | if (GroupID == UUID.Zero && (GroupName == null || GroupName != null && GroupName == string.Empty)) | 186 | if (GroupID == UUID.Zero && (GroupName == null || GroupName != null && GroupName == string.Empty)) |
187 | return null; | 187 | return null; |
188 | 188 | ||
189 | return m_CacheWrapper.GetGroupRecord(RequestingAgentID,GroupID,GroupName, delegate | 189 | return m_CacheWrapper.GetGroupRecord(RequestingAgentID,GroupID,GroupName, delegate |
190 | { | 190 | { |
191 | return m_GroupsService.GetGroupRecord(RequestingAgentID, GroupID, GroupName); | 191 | return m_GroupsService.GetGroupRecord(RequestingAgentID, GroupID, GroupName); |
192 | }); | 192 | }); |
193 | } | 193 | } |
194 | 194 | ||
@@ -362,7 +362,7 @@ namespace OpenSim.Groups | |||
362 | m_GroupsService.RemoveAgentToGroupInvite(RequestingAgentID, inviteID); | 362 | m_GroupsService.RemoveAgentToGroupInvite(RequestingAgentID, inviteID); |
363 | } | 363 | } |
364 | 364 | ||
365 | public bool AddGroupNotice(string RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, | 365 | public bool AddGroupNotice(string RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, |
366 | bool hasAttachment, byte attType, string attName, UUID attItemID, string attOwnerID) | 366 | bool hasAttachment, byte attType, string attName, UUID attItemID, string attOwnerID) |
367 | { | 367 | { |
368 | GroupNoticeInfo notice = new GroupNoticeInfo(); | 368 | GroupNoticeInfo notice = new GroupNoticeInfo(); |
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) |