aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Friends
diff options
context:
space:
mode:
authorOren Hurvitz2014-06-01 17:39:11 +0300
committerOren Hurvitz2014-07-21 08:30:03 +0100
commit99ac770abbe3a95887c4b10c82f3985aa878eeef (patch)
tree8c946dab083dd50a352f3861415eca43185d8d95 /OpenSim/Region/CoreModules/Avatar/Friends
parentSet "[Terrain]SendTerrainUpdatesByViewDistance=true" by default. (diff)
downloadopensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.zip
opensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.tar.gz
opensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.tar.bz2
opensim-SC_OLD-99ac770abbe3a95887c4b10c82f3985aa878eeef.tar.xz
Close streams immediately when we finish using them
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Friends')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs15
1 files changed, 2 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
index ff87ece..13512a2 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -289,18 +289,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
289 289
290 rootElement.AppendChild(result); 290 rootElement.AppendChild(result);
291 291
292 return DocToBytes(doc); 292 return Util.DocToBytes(doc);
293 }
294
295 private byte[] DocToBytes(XmlDocument doc)
296 {
297 MemoryStream ms = new MemoryStream();
298 XmlTextWriter xw = new XmlTextWriter(ms, null);
299 xw.Formatting = Formatting.Indented;
300 doc.WriteTo(xw);
301 xw.Flush();
302
303 return ms.ToArray();
304 } 293 }
305 294
306 #endregion 295 #endregion