diff options
author | UbitUmarov | 2017-05-07 00:47:45 +0100 |
---|---|---|
committer | UbitUmarov | 2017-05-07 00:47:45 +0100 |
commit | d0912b61516914f810ba306641aaaa813134462e (patch) | |
tree | fc2592d3f9514badd547ab0bad6cf6c4b6097f05 /OpenSim/Region | |
parent | oops closed too soon (diff) | |
download | opensim-SC_OLD-d0912b61516914f810ba306641aaaa813134462e.zip opensim-SC_OLD-d0912b61516914f810ba306641aaaa813134462e.tar.gz opensim-SC_OLD-d0912b61516914f810ba306641aaaa813134462e.tar.bz2 opensim-SC_OLD-d0912b61516914f810ba306641aaaa813134462e.tar.xz |
let StreamReader be in using statements
Diffstat (limited to 'OpenSim/Region')
4 files changed, 13 insertions, 11 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs index b3e3ac3..e8387e3 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/RegionConsoleModule.cs | |||
@@ -185,8 +185,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
185 | 185 | ||
186 | protected override byte[] ProcessRequest(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 186 | protected override byte[] ProcessRequest(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
187 | { | 187 | { |
188 | StreamReader reader = new StreamReader(request); | 188 | string message; |
189 | string message = reader.ReadToEnd(); | 189 | using(StreamReader reader = new StreamReader(request)) |
190 | message = reader.ReadToEnd(); | ||
190 | 191 | ||
191 | OSD osd = OSDParser.DeserializeLLSDXml(message); | 192 | OSD osd = OSDParser.DeserializeLLSDXml(message); |
192 | 193 | ||
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs index 81aa882..091b197 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs | |||
@@ -65,9 +65,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends | |||
65 | protected override byte[] ProcessRequest( | 65 | protected override byte[] ProcessRequest( |
66 | string path, Stream requestData, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 66 | string path, Stream requestData, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
67 | { | 67 | { |
68 | StreamReader sr = new StreamReader(requestData); | 68 | string body; |
69 | string body = sr.ReadToEnd(); | 69 | using(StreamReader sr = new StreamReader(requestData)) |
70 | sr.Close(); | 70 | body = sr.ReadToEnd(); |
71 | |||
71 | body = body.Trim(); | 72 | body = body.Trim(); |
72 | 73 | ||
73 | //m_log.DebugFormat("[XXX]: query String: {0}", body); | 74 | //m_log.DebugFormat("[XXX]: query String: {0}", body); |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateRequestHandler.cs b/OpenSim/Region/CoreModules/World/Estate/EstateRequestHandler.cs index 7ab92d1..5eda8ab 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateRequestHandler.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateRequestHandler.cs | |||
@@ -60,9 +60,10 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
60 | protected override byte[] ProcessRequest(string path, Stream requestData, | 60 | protected override byte[] ProcessRequest(string path, Stream requestData, |
61 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 61 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
62 | { | 62 | { |
63 | StreamReader sr = new StreamReader(requestData); | 63 | string body; |
64 | string body = sr.ReadToEnd(); | 64 | using(StreamReader sr = new StreamReader(requestData)) |
65 | sr.Close(); | 65 | body = sr.ReadToEnd(); |
66 | |||
66 | body = body.Trim(); | 67 | body = body.Trim(); |
67 | 68 | ||
68 | // m_log.DebugFormat("[XESTATE HANDLER]: query String: {0}", body); | 69 | // m_log.DebugFormat("[XESTATE HANDLER]: query String: {0}", body); |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs index c0de3d9..a5dc0ad 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs | |||
@@ -460,9 +460,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge | |||
460 | 460 | ||
461 | if (resp.ContentLength > 0) | 461 | if (resp.ContentLength > 0) |
462 | { | 462 | { |
463 | StreamReader content = new StreamReader(resp.GetResponseStream()); | 463 | using(StreamReader content = new StreamReader(resp.GetResponseStream())) |
464 | m_log.ErrorFormat("[Concierge] response from {0} content: {1}", bs.Uri, content.ReadToEnd()); | 464 | m_log.ErrorFormat("[Concierge] response from {0} content: {1}", bs.Uri, content.ReadToEnd()); |
465 | content.Close(); | ||
466 | } | 465 | } |
467 | } | 466 | } |
468 | } | 467 | } |