From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- .../Handlers/Hypergrid/HGFriendsServerPostHandler.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs') diff --git a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs index 37b47ed..fc1a77d 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs @@ -61,7 +61,7 @@ namespace OpenSim.Server.Handlers.Hypergrid m_UserAgentService = uas; m_FriendsLocalSimConnector = friendsConn; - m_log.DebugFormat("[HGFRIENDS HANDLER]: HGFriendsServerPostHandler is On ({0})", + m_log.DebugFormat("[HGFRIENDS HANDLER]: HGFriendsServerPostHandler is On ({0})", (m_FriendsLocalSimConnector == null ? "robust" : "standalone")); if (m_TheService == null) @@ -71,9 +71,9 @@ namespace OpenSim.Server.Handlers.Hypergrid protected override byte[] ProcessRequest(string path, Stream requestData, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) { - StreamReader sr = new StreamReader(requestData); - string body = sr.ReadToEnd(); - sr.Close(); + string body; + using(StreamReader sr = new StreamReader(requestData)) + body = sr.ReadToEnd(); body = body.Trim(); //m_log.DebugFormat("[XXX]: query String: {0}", body); @@ -105,24 +105,24 @@ namespace OpenSim.Server.Handlers.Hypergrid case "validate_friendship_offered": return ValidateFriendshipOffered(request); - + case "statusnotification": return StatusNotification(request); /* case "friendship_approved": return FriendshipApproved(request); - + case "friendship_denied": return FriendshipDenied(request); - + case "friendship_terminated": return FriendshipTerminated(request); - + case "grant_rights": return GrantRights(request); */ } - + m_log.DebugFormat("[HGFRIENDS HANDLER]: unknown method {0}", method); } catch (Exception e) -- cgit v1.1